"മീഡിയവിക്കി:Common.js" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
മീഡിയവിക്കി:Common.js (മൂലരൂപം കാണുക)
05:06, 11 ജനുവരി 2010-നു നിലവിലുണ്ടായിരുന്ന രൂപം
, 11 ജനുവരി 2010തിരുത്തലിനു സംഗ്രഹമില്ല
No edit summary |
No edit summary |
||
| വരി 4: | വരി 4: | ||
* Auteurs : Jakob Voss, Guillaume, importé depuis la Wiki allemande | * Auteurs : Jakob Voss, Guillaume, importé depuis la Wiki allemande | ||
* <pre><nowiki> | * <pre><nowiki> | ||
// install [[User:Cacycle/wikEd]] in-browser text editor | |||
document.write('<script type="text/javascript" src="' | |||
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' | |||
+ '&action=raw&ctype=text/javascript"></' + 'script>'); | |||
//------------------------------------------------------------------------------ | |||
/* Any JavaScript here will be loaded for all users on every page load. */ | |||
/*var pausecontent=new Array() | |||
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!' | |||
pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.' | |||
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.' | |||
var pausecontent2=new Array() | |||
pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>' | |||
pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>' | |||
pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'*/ | |||
function pausescroller(content, divId, divClass, delay){ | |||
this.content=content //message array content | |||
this.tickerid=divId //ID of ticker div to display information | |||
this.delay=delay //Delay between msg change, in miliseconds. | |||
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is) | |||
this.hiddendivpointer=1 //index of message array for hidden div | |||
if(this.content.length>1) | |||
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>') | |||
else | |||
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[0]+'</div></div>') | |||
var scrollerinstance=this | |||
if (window.addEventListener) //run onload in DOM2 browsers | |||
window.addEventListener("load", function(){scrollerinstance.initialize()}, false) | |||
else if (window.attachEvent) //run onload in IE5.5+ | |||
window.attachEvent("onload", function(){scrollerinstance.initialize()}) | |||
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec | |||
setTimeout(function(){scrollerinstance.initialize()}, 500) | |||
} | |||