General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
How do I block scrolling marquee
Posted by: Arrow
Date: January 06, 2008 09:25AM

that uses this script,

/***********************************************
* Memory Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var memorywidth="600px" //scroller width
var memoryheight="20px" //scroller height
var memorybgcolor="#FFFFFF" //scroller background
var memorypadding="2px" //padding applied to the scroller. 0 for non.
var borderCSS="border: 1px solid white;" //Border CSS, applied to scroller to give border.

var memoryspeed=2 //Scroller speed (larger is faster 1-10)
var pauseit=1 //Pause scroller onMousever (0=no. 1=yes)?

var persistlastviewedmsg=1 //should scroller's position persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".

//Specify the scroller's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var memorycontent='<nobr><span style="font: bold 13px Verdana">SCROLLING MESSAGE GOES IN HERE.</span></nobr>'

////NO NEED TO EDIT BELOW THIS LINE////////////
var combinedcssTable="width:"+(parseInt(memorywidth)+6)+"px;background-color:"+memorybgcolor+";padding:"+memorypadding+";"+borderCSS+";"
var combinedcss="width:"+memorywidth+";height:"+memoryheight+";"

var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
memoryspeed=(document.all)? memoryspeed : Math.max(1, memoryspeed-1) //slow speed down by 1 for NS
var copyspeed=memoryspeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-10000px">'+memorycontent+'</span>')
var actualwidth=''
var memoryscroller

if (window.addEventListener)
window.addEventListener("load", populatescroller, false)
else if (window.attachEvent)
window.attachEvent("onload", populatescroller)
else if (document.all || document.getElementById)
window.onload=populatescroller

function populatescroller(){
memoryscroller=document.getElementById? document.getElementById("memoryscroller") : document.all.memoryscroller
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
if (persistlastviewedmsg && get_cookie("lastscrollerpos")!="")
revivelastmsg()
memoryscroller.innerHTML=memorycontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
lefttime=setInterval("scrollmarquee()",20)
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function savelastmsg(){
document.cookie="lastscrollerpos="+memoryscroller.style.left
}

function revivelastmsg(){
lastscrollerpos=parseInt(get_cookie("lastscrollerpos"))
memoryscroller.style.left=parseInt(lastscrollerpos)+"px"
}

if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg

function scrollmarquee(){
if (parseInt(memoryscroller.style.left)>(actualwidth*(-1)+8))
memoryscroller.style.left=parseInt(memoryscroller.style.left)-copyspeed+"px"
else
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
}

if (iedom){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0" style="'+combinedcssTable+'"><td>')
write('<div style="position:relative;overflow:hidden;'+combinedcss+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=memoryspeed">')
write('<div id="memoryscroller" style="position:absolute;left:0px;top:0px;" '+divonclick+'></div>')
write('</div>')
document.write('</td></table>')
}
}

==================================================================





This code doesn't block it
/* block all MARQUEE elements */
marquee { display: none !important;
}

nor this

/* Stop those <marquee> tags! */
marquee {
-moz-binding : none !important;
display : block;
height : auto !important;
}

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: JohnHell
Date: January 06, 2008 08:01PM

It is not a marquee, it is a div that scrolls as a marquee because the script.

If you use div{display:none} you can hide it but... it would hide all divs.

This div has the id memoryscroller but still using div[id="memoryscroller"]{display:none!important} with or without important and with or without a wilcard (id*) it doesn't work. sad smiley

I hate the new tricks to insert ads.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 07, 2008 10:12AM

Thankyou for identifying that is was in fact a div problem.

The first code didn't block it whereas the second one - inc variations did - unfortunately, for some reason it also took out all the rest of the page content along with the scroller grinning smiley

However searching the web for blocking div led me to an alternative solution which is disabling javascript.
My firewall has an active content plugin which allows for blocking or allowing various elements on a per site basis - so I have disabled java on that site and the scrolling has gone.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: JohnHell
Date: January 07, 2008 01:37PM

Quote
Arrow
However searching the web for blocking div led me to an alternative solution which is disabling javascript.

Yes, but this tricked marquee and the original ones, those with the <marquee> tag. The only real way to block them is disabling javascript. This is explained in the K-meleon option for disable marquees.

Quote
Arrow
My firewall has an active content plugin which allows for blocking or allowing various elements on a per site basis - so I have disabled java on that site and the scrolling has gone.

Great!

How I wish that funcion!smiling smiley (but I don't like those firewalls that do more than required.)

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 09, 2008 07:34AM

I was looking at it further thinking that Noscript would have blocked that div just for that site - it does on Firefox which I seldom use - but not on my official K-meleon with the K-M version of the extension. But maybe it is not working correctly for me as when I click on options in the Noscript menu nothing happens

However even if NoScript did work for the div, it is a little moot for me because I use Hao's ccf versions and I don't know how to adapt Noscript for ccf or indeed if it is possible?



Edited 2 time(s). Last edit at 01/09/2008 07:36AM by Arrow.

Options: ReplyQuote
Re: ./chrome/NoScript.manifest
Posted by: guenter
Date: January 09, 2008 03:07PM

content noscript jar:noscript.jar!/content/noscript/

locale noscript en-US jar:noscript.jar!/locale/en-US/noscript/

locale noscript de-DE jar:noscript.jar!/locale/de-DE/noscript/
locale noscript fr-FR jar:noscript.jar!/locale/fr-FR/noscript/
locale noscript es-ES jar:noscript.jar!/locale/es-ES/noscript/
locale noscript ru-RU jar:noscript.jar!/locale/ru-RU/noscript/
locale noscript pt-BR jar:noscript.jar!/locale/pt-BR/noscript/

skin noscript classic/1.0 jar:noscript.jar!/skin/classic/noscript/



Edited 1 time(s). Last edit at 01/12/2008 02:10PM by guenter.

Options: ReplyQuote
Re: ./defaults/pref/noscript.js
Posted by: guenter
Date: January 09, 2008 03:08PM

pref("extensions.{73a6fe31-595d-460b-a920-fcc0f8843232}.description", "chrome://noscript/locale/about.properties");
pref("noscript.autoReload", true);
pref("noscript.autoReload.global", true);
pref("noscript.autoReload.allTabs", true);
pref("noscript.autoReload.useHistory", false);
pref("noscript.autoReload.useHistory.exceptCurrent", true);
pref("noscript.ctxMenu", true);
pref("noscript.statusIcon", true);
pref("noscript.sound", false);
pref("noscript.sound.oncePerSite", true);
pref("noscript.notify", true);
pref("noscript.notify.bottom", true);
pref("noscript.showAddress", false);
pref("noscript.showDomain", false);
pref("noscript.showTemp", true);
pref("noscript.showPermanent", true);
pref("noscript.showDistrust", true);
pref("noscript.showUntrusted", true);
pref("noscript.showBaseDomain", true);
pref("noscript.showGlobal", true);
pref("noscript.mandatory", "chrome: about: resource:");
pref("noscript.default", "chrome: resource: about:blank about:neterror about:config about:plugins about:credits addons.mozilla.org flashgot.net gmail.com google.com googlesyndication.com informaction.com yahoo.com yimg.com maone.net noscript.net hotmail.com msn.com passport.com passport.net passportimages.com live.com");
pref("noscript.forbidJava", true);
pref("noscript.forbidFlash", false);
pref("noscript.forbidPlugins", false);
pref("noscript.forbidData", false);
pref("noscript.sound.block", "chrome://noscript/skin/block.wav");
pref("noscript.allowClipboard", false);
pref("noscript.allowLocalLinks", false);
pref("noscript.pluginPlaceholder", "chrome://noscript/skin/icon32.png");
pref("noscript.showPlaceholder", true);
pref("noscript.global", false);
pref("noscript.confirmUnblock", true);
pref("noscript.confirmUnsafeReload", true);
pref("noscript.statusLabel", false);
pref("noscript.forbidBookmarklets", false);
pref("noscript.allowBookmarks", false);
pref("noscript.notify.hideDelay", 5);
pref("noscript.notify.hide", false);
pref("noscript.truncateTitleLen", 255);
pref("noscript.truncateTitle", true);
pref("noscript.fixLinks", true);
pref("noscript.noping", true);
pref("noscript.consoleDump", 0);
pref("noscript.excaps", true);
pref("noscript.nselForce", true);
pref("noscript.nselNever", false);
pref("noscript.nselNoMeta", true);
pref("noscript.autoAllow", 0);
pref("noscript.toolbarToggle", 3);
pref("noscript.forbidImpliesUntrust", false);
pref("noscript.keys.toggle", "ctrl shift VK_BACK_SLASH.|");
pref("noscript.keys.ui", "ctrl shift S");

pref("noscript.forbidMetaRefresh", false);
pref("noscript.forbidMetaRefresh.remember", false);
pref("noscript.forbidMetaRefresh.notify", true);

pref("noscript.contentBlocker", false);

pref("noscript.toggle.temp", true);
pref("noscript.firstRunRedirection", true);

pref("noscript.xss.notify", true);
pref("noscript.xss.notify.subframes", false);

pref("noscript.xss.trustReloads", false);
pref("noscript.xss.trustData", true);
pref("noscript.xss.trustExternal", false);
pref("noscript.xss.trustTemp", true);

pref("noscript.filterXPost", true);
pref("noscript.filterXGet", true);
pref("noscript.filterXGetRx", "(?:<+(?=[^<>=\\d\\. ])|[\\\\'\"\\x00-\\x07\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F])");
pref("noscript.filterXGetUserRx", "");
pref("noscript.filterXExceptions", "^http://([a-z]+)\\.google\\.(?:[a-z]{1,3}\\.)?[a-z]+/(?:search|custom|\\1)\\?\n^http://([a-z]*)\\.?search\\.yahoo\\.com/search(?:\\?|/\\1\\b)\n^http://[a-z]+\\.wikipedia\\.org/wiki/[^\"<>\?%]+$");
pref("noscript.injectionCheck", 2);
pref("noscript.injectionCheck.timeout", 800);
pref("noscript.injectionCheck.loops", 20);

pref("noscript.blockXIntranet", true);
pref("noscript.intranetMaskRx", "^(127\\.[\\d.]+)");

pref("noscript.blockCssScanners", true);

pref("noscript.globalwarning", true);

pref("noscript.jsredirectIgnore", false);
pref("noscript.jsredirectFollow", true);

pref("noscript.safeToplevel", true);
pref("noscript.utf7filter", true);

pref("noscript.badInstall", false);

pref("noscript.fixURI", true);
pref("noscript.fixURI.exclude", "");

pref("noscript.blockNSWB", false);

pref("noscript.urivalid.aim", "\\w[^\\\\\?&\\x00-\\x1f#]*(?:\\?[^\\\\\\x00-\\x1f#]*(?:#[\\w\\-\\.\\+@]{2,32})?)?");

pref("noscript.forbidExtProtSubdocs", true);

pref("noscript.forbidChromeScripts", false);

Options: ReplyQuote
./components/noscriptService.js
Posted by: guenter
Date: January 09, 2008 03:13PM

The download for alain's NoScript extension installer seems broken and misses the 2 files i posted and 1 that I placed at Rapidshare. With the 3 files at the places and names posted in the headers of the 3 postings the NoScript that alain and others adapted BTW. equipped and enhenced with K-Meleon macros works at my PC - this includs a working Options menu.

No warranties that anything will work for You smiling smiley

p.s. I could not post noscriptService.js - our forum claims I have used a bad word, grinning smiley oh naughty guenter - You have again tried to be a bad boy and spammer
we should report You to the moderators grinning smiley


The download at Rapidshare may be even full of viruses and malware - use You own security software before using anything that You download from Internet! No warrenties for anything.

And "No" I will not do future updates of NoScript XUL or JS.



Edited 2 time(s). Last edit at 01/09/2008 07:08PM by guenter.

Options: ReplyQuote
Re: ./components/noscriptService.js
Posted by: JujuLand
Date: January 09, 2008 06:07PM

@guenter,

Sorry for not having updated noscript with the file you send me. And I don't know if it's due to my great age :-) but I don't remember where I have put it..

Send me it again, I'll do a new setup.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: ./components/noscriptService.js
Posted by: guenter
Date: January 09, 2008 07:16PM

Your NoScript that is on Your server is good enough for me & I do not remember to have send an update. I posted the 3 files needed by the few PPL that use NoScript. And I hope that all, including Options, will work for them if the files are present.


p.s. I do not complain about your free gift except that i said that the download is broken. I hope You find that no problem, reason to be sorry or angry about me. The newer NoScript versions will probably not work - You should not spent time on them either.



Edited 2 time(s). Last edit at 01/10/2008 02:29AM by guenter.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 10, 2008 10:22AM

Thankyou guenter.

I don't have time right now, but will play with them in the next couple of days grinning smiley

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: JujuLand
Date: January 10, 2008 01:29PM

@guenter,

Quote
that i said that the download is broken

What is broken, I have downloaded it without problem. Is the setup broken ?

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: guenter
Date: January 10, 2008 02:20PM

Yes - sorry - Setup, it did not copy the files in place on my PC.

p.s. I assume that the Setup file got damaged during upload. I am sure You test things before You upload. And that is why I wrote the download is damaged. The file itself not the location is broken.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: JujuLand
Date: January 10, 2008 02:28PM

ok, I'll upload it again.

Just a question: is there a message when setup is running, or no message and then the extension doesn't work?

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc





Edited 2 time(s). Last edit at 01/10/2008 02:31PM by JujuLand.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: guenter
Date: January 10, 2008 06:52PM

I did not get messages.

After it did not install to work - i extracted the setup and did not find the 3 files. Then I took 3 files from my own ancient NoScript that I have since before You folks created the macros that go with it now. And voila all worked well.



Edited 1 time(s). Last edit at 01/10/2008 06:53PM by guenter.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 11, 2008 09:04AM

Thank you guenter "Options" and "About" open fine now and the div is blocked.

p.s. anyone have an english version of options for a poor german illiterate like myself? grinning smiley

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: guenter
Date: January 11, 2008 10:31AM

grinning smiley So this teaches You some German that is eye rolling smiley and far better than no NoScript Options. tongue sticking out smiley

K-Meleon should sniff and use anything available in Your native language automatically. Mine does. (but there is an bug in the structure of this NoScript chrome)

You should be able to force a language by offering only one chrome language locale.

So to force the language to en-US You only write these 3 lines into NoScript.manifest:


content noscript jar:noscript.jar!/content/noscript/

locale noscript en-US jar:noscript.jar!/locale/en-US/noscript/

skin noscript classic/1.0 jar:noscript.jar!/skin/classic/noscript/


p. s. Info for PPL that speak languages that have no K-Meleon translation available and use NoScript or other chrome extensions. You can edit the manifests and offer only Your native language. This works even when no K-Meleon version in Your native language exists! The only provision, the chrome locale must be available in You language.

NoScript has 32 language translations - it is worthwhile to unzip NoScript.jar and have a look.

AFAIK You could simply edit the bold language-NATION ID to Your language ID

locale noscript en-US jar:noscript.jar!/locale/zh-CN/noscript/

My example says: for American-English locale use the simplified Chinese translation grinning smiley

You can also create partially translated K-Meleons by adapting a lang_xx-YY.kmm.
For details look into the official translation package. K-Meleon will use any bit available in Your language (e.g. chrome parts) and is supposed to default to English without error if no translation for bits and pieces exist. As far as I have observed You can use the already finished items while Your locale translation is work in progress (the tolerant behaviour is highly unusual for any piece of software ).

K-Meleon defaults to any language if something is only available in that language.

So this line as the only chrome locale offered will force any K-Meleon to use Chinese NoScript locale.

locale noscript zh-CN jar:noscript.jar!/locale/zh-CN/noscript/



Edited 6 time(s). Last edit at 01/12/2008 02:13PM by guenter.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 12, 2008 03:29AM

Thanks guenter!
I now have only those 3 lines in noscript.manifest but the menu settings are all still in german within the options dialogue box.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: guenter
Date: January 12, 2008 07:36AM

Means English chrome is broken and NoScript falls back to an available language. Sorry to hear & I will see if I can fix it.



Edited 1 time(s). Last edit at 01/12/2008 07:36AM by guenter.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: guenter
Date: January 12, 2008 02:35PM

Ok: the bug was in the Engish locale line of my manifest sad smiley
I reedited en-US locale Manifest line posts - all should work now.

p.s. The first correct line pointed to the German locale translation - the next good one to fr-FR... That why it took an English user to notice. Thx Arrow.

@alain there is duplicate en-US in ./content/noscript/en-US. The en-US locale line that did not work pointed to that. AFAIK the folder and files can be deleted - that reduces download.



Edited 2 time(s). Last edit at 01/12/2008 02:37PM by guenter.

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: Arrow
Date: January 14, 2008 06:08AM

Many thanks for your assistance, all fine now!

Options: ReplyQuote
Re: How do I block scrolling marquee
Posted by: JujuLand
Date: January 14, 2008 08:33AM

ok, I look at these points.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc





Edited 1 time(s). Last edit at 01/14/2008 08:53AM by JujuLand.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.