简体   繁体   English

将Chrome扩展程序更改为manifest_version 2需要做些什么? 我的扩展程序只是在弹出窗口中打开一个URL。

[英]What needs to be done for changing a Chrome Extension to manifest_version 2? My extension simply opens a url in a popup.

What is the alternative to eval() in his case? 在他的情况下,eval()的替代方法是什么?

<script>
function load() {

    var url = 'index.html';
    if(eval('('+localStorage['isprouser']+')') == true)
    url = 'index.html';

    window.location = url;
}
</script>

I guess this is not allowed. 我想这是不允许的。

You can replace the evel line with this: 您可以将evel行替换为:

localStorage.getItem('isprouser'])

and see if you are getting something... 看看你有没有得到...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 chrome.extension.getBackgroundPage() 不适用于 manifest_version: 3 - chrome.extension.getBackgroundPage() doesn't work with manifest_version: 3 manifest_version:2 的边缘扩展不起作用 - Edge extension with manifest_version:2 not works 获取突出显示的文本,对其进行计数,然后将其弹出。 Chrome扩展程序 - Get highlighted text, count it, take it to popup. Chrome extension Chrome扩展程序:如果我的应用程序未设置default_popup,则无法查看Inspect Popup。 如何调试? - Chrome Extension: If my app does not have a default_popup set then I am not able to view Inspect Popup. How to debug? 更改Chrome扩展程序弹出页面 - Changing chrome extension popup page 清单文件中的update_url禁用我的chrome扩展名 - update_url in manifest file disable my chrome extension Chrome扩展程序帮助-将打开页面的网址添加到manifest.json中default_popup的html中的过程是什么? - Chrome extension help - what's the process for adding the url of an open page to the html of the default_popup in manifest.json Chrome扩展程序:更改Chrome弹出窗口的html - Chrome Extension: Changing html of a chrome popup window Chrome扩展程序与背景页面不使用清单版本2 - Chrome Extension With Background Page Not Working With Manifest Version 2 将 Manifest Version 3 Chrome Extension 连接到 firestore 数据库 - Connect a Manifest Version 3 Chrome Extension to a firestore database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM