[英]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.