[Greasemonkey] "Error: No menu commaner" occurs if greasemonkey
0.5 is disabled
Bill Donnelly
donnelly at snowcrest.net
Sun Aug 7 01:33:09 EDT 2005
Altho the above 'fix' stops error messages from being logged
to the JS Console, GmScripts still aren't being injected/executed
for JS code-created pages (as I reported below).
Maybe the two aren't related. (or maybe they are)
Maybe the recent changes changed something so that GmScripts
aren't working for those types of document pages.
Here is the bookmarklet I'm using that is creating the type
of page in question.
javascript:/* show linked images */
(function() { function II(uu){ var tt=uu.split('.'),
ee=tt[tt.length-1].toLowerCase();return
{gif:1,jpg:1,jpeg:1,png:1,mng:1,bmp:1}[ee]}
function hE(ss){return
ss.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/%22/g,'"');}
var qq,hh,ii,zz,ww,ll,ic;
if(frames.length>=2&&window.document.body.innerHTML.search(/<iframe/)==-1)
ww=frames[1];else ww=window;ll=ww.document.links.length;
try{bu=location.href.match(/(^.+\/\/.+\/).*$/)[1]}
catch(eErr){bu=location.href;if(bu.substr(strlen(bu)-1)!=%22/%22)bu=bu+%22/%22}
zz=open().document;zz.write('<html><head><title>Show Linked
Images</title><base href=%22'+
bu+'%22></head><body bgColor=%22black%22 text=%22white%22
onLoad=%22setTimeout(\'focus()\',200)%22><p> </p><p>'+
ll+' Links found on '+hE(ww.location.href)+
':</p><div style=%22cursor: pointer; position: fixed; height: 22px;
width: 57px; top: 7px; left: 400px; color: #000; background-color: #b9dfbb;
text-align: center; font: button 14px/16px sans-serif;
border: 1px outset #5bb560;%22
onClick=%22window.close()%22>Close</div><hr>');
ic=0;for(ii=0;qq=ww.document.links[ii],ii<ll;++ii){
if(((ii&63)==63)?(confirm((ii+1)+' links processed out of
'+ll+'\r\nContinue?')):true)
{hh=qq.href;if(hh&&II(hh)){zz.write('<p>'+qq.innerHTML+' ('+hE(hh)+
')<br><img src=%22'+hE(hh)+'%22 border=1>');++ic}}else{ii=ll}}
zz.write('<hr><p>'+ic+' linked images displayed out of '+ll+
' links from '+hE(ww.location.href)+'</p></body></html>');zz.close()})()
The bookmarklet is a bit large, but it basically just creates a new document
window of all images that were linked to on the source page.
Another example is the JavaScript Shell bookmarklet, as well,
which also used to execute GmScripts, and now does not, so I guess
it could be a separate issue from the commander problem. (?)
It's not a huge deal, but I hope someone has time to look into it sometime.
--
Sometimes bad things happen to good people.
When that happens, those good people should
seek out and find some bad people.
And then do something bad to them.
Just to even things out.
It's only fair, after all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050807/6a60d008/attachment.htm
More information about the Greasemonkey
mailing list