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=leopoldus] siria JamesD [quote]Maybe you could post your code for savepagewithorigin.kmm in this thread. Perhaps in editing the code, some unexpected change has happened.[/quote] Thank you, guys! I could now find my mistake and it was very stupid: I tried to use the macro with a slightly different code in K-Meleon 1.5.3. and 1.5.4, that's why it did not work there :s When I copied it in K-Meleon 1.6 installation, it did not work there as well. Below is the macro code with my (wrong) changes. Can you suppose, which part of ma addition is incorrect? [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; [color=#FF0099][b]$_code="var x=document.body.innerHTML; document.body.innerHTML='<b><i>Saved from original URL: ' + document.location </b></i> + '<br><hr><hr>' +x ;document.close();";[/b][/color] 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