Chrome扩展程序,内容脚本的程序化注入

时间:2017-05-09 00:24:57

标签: google-chrome-extension

我正在使用Chrome扩展程序,该扩展程序需要在后台页面内的IFrame内显示内容。

另外,我不想使用template <typename T> const T *as_const_ptr (const T *p) { return p; } template < typename T, typename std::enable_if_t<std::is_pointer<T>::value>* = nullptr > auto __decayFunction (T t) -> decltype(as_const_ptr(t)) { return as_const_ptr(t); } template < typename T, typename std::enable_if_t<!std::is_pointer<T>::value>* = nullptr > decltype(auto) __decayFunction (T t) { return t; } template<class T> struct return_type { private: using U = typename std::remove_reference<T>::type; public: using type = decltype(__decayFunction(std::declval<U>())); }; 权限。我想在运行时只请求所需的主机权限。

我无法找到两种方法。

Here是声明内容编写的两种方式。

清单文件的问题是:我无法指定匹配模式,因为我不了解主机,我不想使用<all_urls>比赛模式。有没有办法在运行时更改此设置?

程序化注入的问题是:后台页面没有<all_urls>。没有它,我无法使用tabId。是否有另一种方法将内容脚本注入后台页面内的IFrame?

1 个答案:

答案 0 :(得分:0)

尚未Here是我提出的功能请求。他们说:

  

它可能不是我们能立刻得到的东西

相关问题