MediaWiki talk:Common.js/Archive 8: Difference between revisions

Content deleted Content added
MalnadachBot (talk | contribs)
m Fixed Lint errors. (Task 12)
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB)
Line 3:
{{tl|editprotected}}
Looks like developers did the same thing for global JS/CSS files as they already did before for personal js/css files: now the whole page is shown inside &lt;pre class="mw-code mw-js"> tag, which means nothing is going to work inside and we can remove all templates (e.g. {{tl|Interwiki-all}} in [[MediaWiki:Monobook.css]] and [[MediaWiki:Common.css]]), <nowiki>[[User:]]</nowiki> links, headings, &lt;pre> tags and so on. However, there is still one little reason to keep &lt;source> tag: you can trasclude the file on another page and then still enjoy it with syntax highlighting ∴ [[User:Alex Smotrov|Alex Smotrov]] 22:29, 27 June 2007 (UTC)
: For highlighting add both <nowiki></pre></nowiki> before <nowiki><sourcesyntaxhighlight ...></nowiki> and <nowiki><pre></nowiki> after <nowiki></sourcesyntaxhighlight></nowiki> tags.--[[User:AlefZet|AlefZet]] 21:57, 28 June 2007 (UTC)
::Well, that was my first idea as well, but it doesn't work since Mediawiki simply replaces all &lt; into &amp;lt;. Note that this doesn't happen immediately after saving (I have no idea why), so if markup on js/css pages seems to work for you, just wait a little and it won't ;) ∴ [[User:Alex Smotrov|Alex Smotrov]] 22:13, 28 June 2007 (UTC)
 
Line 317:
::::::I did not say "you're requred to provide documentation", but that would be a nice thing to do; and be realistic - someone else would have asked anyway; and I don't see why this page is less suited to ask questions than your talk page ∴ [[User:Alex Smotrov|Alex Smotrov]] 20:04, 16 July 2007 (UTC)
 
<sourcesyntaxhighlight lang=javascript enclose=div>
if (!document.cookie.match('hidedcn=1')){
insertsub=document.getElementById("contentSub")
Line 323:
'<div class="plainlinks" id="WN_DCN" style="width:98%; margin:5px auto 0; background:transparent; text-align:right;"><font size="+1" color="#000000">The next <a href="http://en.wikipedia.org/wiki/Wikipedia:Meetup/DC_2">Washington DC meetup</a> is Saturday the 21st.<br/></font><i>You\'re invited! [<a href="#" onClick="var date = new Date(); date.setTime(date.getTime()+86400000);document.cookie = \'hidedcn=1; expires=\' + date.toGMTString() + \'; path=/\';document.getElementById(\'WN_DCN\').style.visibility = \'hidden\';return false">hide</a>]</i></div>'
}
</syntaxhighlight>
</source>
 
:I notice this is accessing some python script, which generates that JavaScript code for some people. I don't see any documentation or code for the python script makes use of our IP address information. Gmaxwell is a trusted and experienced user, who I'm sure wouldn't misuse any of that information. Nonetheless, I think people would be reassured if the python source code was provided. --[[User:Aude|Aude]] <small>([[User talk:Aude|talk]])</small> 17:02, 16 July 2007 (UTC)