[英]How can a Chrome extension's content script determine the injected page's referrer?
What is the best way to determine a page's referrer within the context of a content script in a Chrome extension? 在Chrome扩展程序中的内容脚本的上下文中确定页面引荐来源网址的最佳方法是什么?
It looks possible to intercept requests' headers using the chrome.webRequest module, but it would then take some book-keeping and message-passing in order to get it into the content script. 看起来可以使用chrome.webRequest模块拦截请求的标头,但随后需要进行簿记和消息传递才能将其放入内容脚本中。
That approach feels kludgy. 这种方法让人感到困惑。 Is there a better way? 有没有更好的办法?
怎么样document.referrer
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.