I'm a newcomer to bookmarklets and I am experimenting with loading a JavaScript file from my own server/domain using the following bookmarklet/javascript code:
javascript:(function(){s=document.createElement('script');
s.type='text/javascript';
s.src='http://www.test.com/js.js?v='+parseInt(Math.random()*99999999);
document.body.appendChild(s);})();
When I press this bookmarklet on my Firefox toolbar while visiting pages on the test.com domain, the code works perfectly - js.js is loaded and executed.
However, when I go to google.com or any other site and press the bookmarklet button, the isn't even loaded (as seen in the server log).
I understand that there are cross-domain restrictions, but do they only apply to AJAX requests and similar operations?