General
: K-Meleon Forum
General discussion about K-Meleon.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ siria Thanks for the code. Big oops on my part. The page I was testing has a black area at the top of the page so I did not see the text written there. The second page just happened to have a dark blue banner at the top. I did not see that one either. The third page was white and the black text showed up just fine. I have it working now. I put code to make sure JS is enabled. At least this works on my system. I hope it meets leopoldus's requirements. [b]savepagewithorigin.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # # ---------- savepagewithorigin.kmm # Dependencies : main.kmm # Resources : - # Preferences : - # Version : .3 2011_07_18 JamesD JS code by siria # -------------------------------------------------------------------------------- _savepagewithorigin_RunCode { $_spwo_Flip = false; getpref( STRING, "capability.policy.default.javascript.enabled")=="noAccess" ? $_spwo_Flip=true : 0 ; $_spwo_Flip == true ? togglepref( STRING, "capability.policy.default.javascript.enabled", "noAccess", "allAccess") : 0; $_code="var x=document.body.innerHTML; document.body.innerHTML='URL: ' + document.location + '<br><hr>' +x ;document.close();"; injectJS($_code); $_spwo_Flip == true ? togglepref( STRING, "capability.policy.default.javascript.enabled", "noAccess", "allAccess") : 0; id(ID_FILE_SAVE_AS); } _savepagewithorigin_BuildMenu { setmenu("OpenSave",macro,"Save page w/origin..",_savepagewithorigin_RunCode); } ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $OnInit=$OnInit."_savepagewithorigin_BuildMenu;"; $macroModules=$macroModules."savepagewithorigin;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development