I am working on my extension - toolbar for Google Chrome. It is a rectangle:
开发者_运维知识库\#top { width:100%; height:50px; top:0; left:0 }
The problem is the only way I know is to inject toolbar's code into iframe. It is fine as in respect to the same origin policy, the websites cannot manipulate the html that is inside the iframe.
!BUT!
What if the owners of webpages use the code below
$(document).ready(function() {
setInterval('$("#top").hide()',5000);
});
Then it just simply hide my toolbar. So is there any solution possible to prevent such manipulations while developing chrome extension?
Take something that is less likely to exist in the global namespace, for example:
#extension-name-top { width:100%; height:50px; top:0; left:0 }
精彩评论