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=siria] Couldn't stop playing with those borders, oh well ;-) If anyone has use, this can be added somewhere in the macro, to get either red or green dotted borders after a page is loaded. Border only if it is in either the black- or whitelist, not listed sites get nothing. [color=blue]#============ CSS: Dotted borders if page is in a zone ================ $_JSBlacklist_css="html {[b]border: 4px dotted red[/b] !important;}"; $_JSWhitelist_css="html {[b]border: 4px dotted green[/b] !important;}"; $OnLoad=$OnLoad."JSS_injectCSS;"; JSS_injectCSS{ $_JSS_URL = substr($URL,0,index($URL,"://")+3+length(hostname($URL))); index($_JSWhitelist, $_JSS_URL) >-1 ? injectCSS($_JSWhitelist_css) : 0; index($_JSBlacklist, $_JSS_URL) >-1 ? injectCSS($_JSBlacklist_css) : 0; }[/color] The borders are updated only after page loading has finished. If anyone wants to change borders also automatically after TOGGLING, insert the css lines into the "ToggleURL"-macros (black+white): JSWhitelist_ToggleURL{ $_JSS_URL = substr($URL,0,index($URL,"://")+3+length(hostname($URL))); if (index($_JSWhitelist, $_JSS_URL) >-1) { $_JSWhitelist = sub($_JSS_URL." ", "", $_JSWhitelist); setpref(STRING, "capability.policy.jswhitelist.sites", $_JSWhitelist); [b] [color=blue] injectCSS("html {border-color: gold !important;}");[/color][/b] } else { $_JSWhitelist = $_JSWhitelist.$_JSS_URL." "; setpref(STRING, "capability.policy.jswhitelist.sites", $_JSWhitelist); [b] [color=blue] injectCSS($_JSWhitelist_css);[/color][/b] } &JSS_syncButtons; } This will show immediately green or red borders right after toggling, without reload. If the toggle *removes* the page, the borders turn yellow, and will vanish after next page load... - [quote="JamesD"]#========================= AT STARTUP # MINE, probably from testing Policies-Manager: Trusted-Sites, test, wideopen [color=red][b]BUG:[/b] setpref(STRING, "capability.policy.policynames", "jswhitelist, jsblacklist, Trusted-Sites, test, wideopen, ");[/color] #setpref(STRING, "capability.policy.policynames", "jsblacklist");[/quote] Please James, the red line deletes a users's existing list, replace it in your posting with the 3-blue-lines-fix, thanks...[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development