Safari扩展中的当前URL [英] Current URL in Safari Extension

查看:118
本文介绍了Safari扩展中的当前URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

safari.application.activeBrowserWindow.activeTab.url 始终 undefined

知道为什么会这样吗?

推荐答案

我的印象是当加载的页面是扩展网站访问部分。

My impression is that this happens when the loaded page is not "allowed" in the Extension Website Access section of the extension’s configuration.


只有您选择的网站才会注入Web内容进入它们,只有那些网站可以使用标签对象的属性进行操作,例如 title url

Only the websites you choose have web content injected into them, and only those websites can be manipulated using the tab object’s properties, such as title and url.

此外,似乎白名单和黑名单设置应用于扩展网站访问允许的任何内容。

Also, it seems that the Whitelist and Blacklist settings are applied "on top of" whatever is allowed by Extension Website Access.


首先,访问受扩展网站访问设置的限制,然后应用白名单和黑名单。

First, access is limited by the Extension Website Access settings, then the whitelist and blacklist are applied.

这篇关于Safari扩展中的当前URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆