Vous êtes sur la page 1sur 12

/* generated javascript */

var skin = 'monobook';


var stylepath = 'http://bits.wikimedia.org/skins-1.5';
/* MediaWiki:Common.js */
/* Pemboleh ubah sejagat */
var load_edittools = true;
/* Test if an element has a certain class *************************************
*
*
* Description: Uses regular expressions and caching for better performance.
* Maintainers: User:Mike Dillon, User:R. Koot, User:SG
*/
var hasClass = (function () {
var reCache = {};
return function (element, className) {
return (reCache[className] ? reCache[className] : (reCache[className] =
new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
};
})();
/** Interwiki links to featured articles ***************************************
*
* Description: Highlights interwiki links to featured articles (or
* equivalents) by changing the bullet before the interwiki link
* into a star.
* Maintainers: User:R. Koot
*/
function LinkFA()
{
if ( document.getElementById( "p-lang" ) ) {
var InterwikiLinks = document.getElementById( "p-lang" ).getElementsByT
agName( "li" );
for ( var i = 0; i < InterwikiLinks.length; i++ ) {
if ( document.getElementById( InterwikiLinks[i].className + "-fa" )
) {
InterwikiLinks[i].className += " FA"
InterwikiLinks[i].title = "This is a featured article in anothe
r language.";
}
}
}
}
addOnloadHook( LinkFA );
/** Collapsible tables *********************************************************
*
* Description: Allows tables to be collapsed, showing only the header. See
* [[Wikipedia:NavFrame]].
* Maintainers: User:R. Koot
*/
var autoCollapse = 2;
var collapseCaption = "sembunyi";
var expandCaption = "papar";
function collapseTable( tableIndex )
{
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
if ( !Table || !Button ) {
return false;
}
var Rows = Table.getElementsByTagName( "tr" );
if ( Button.firstChild.data == collapseCaption ) {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = "none";
}
Button.firstChild.data = expandCaption;
} else {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = Rows[0].style.display;
}
Button.firstChild.data = collapseCaption;
}
}
function createCollapseButtons()
{
var tableIndex = 0;
var NavigationBoxes = new Object();
var Tables = document.getElementsByTagName( "table" );
for ( var i = 0; i < Tables.length; i++ ) {
if ( hasClass( Tables[i], "collapsible" ) ) {
NavigationBoxes[ tableIndex ] = Tables[i];
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
var Button = document.createElement( "span" );
var ButtonLink = document.createElement( "a" );
var ButtonText = document.createTextNode( collapseCaption );
Button.style.styleFloat = "right";
Button.style.cssFloat = "right";
Button.style.fontWeight = "normal";
Button.style.textAlign = "right";
Button.style.width = "6em";
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tabl
eIndex + ");" );
ButtonLink.appendChild( ButtonText );
Button.appendChild( document.createTextNode( "[" ) );
Button.appendChild( ButtonLink );
Button.appendChild( document.createTextNode( "]" ) );
var Header = Tables[i].getElementsByTagName( "tr" )[0].getElementsB
yTagName( "th" )[0];
Header.insertBefore( Button, Header.childNodes[0] );
tableIndex++;
}
}
for ( var i = 0; i < tableIndex; i++ ) {
if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex >= aut
oCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) {
collapseTable( i );
}
}
}
addOnloadHook( createCollapseButtons );
/** Dynamic Navigation Bars (experimental) *************************************
*
* Description: See [[Wikipedia:NavFrame]].
* Maintainers: UNMAINTAINED
*/
// set up the words in your language
var NavigationBarHide = '[' + collapseCaption + ']';
var NavigationBarShow = '[' + expandCaption + ']';

// set up max count of Navigation Bars on page,


// if there are more, all will be hidden
// NavigationBarShowDefault = 0; // all bars will be hidden
// NavigationBarShowDefault = 1; // on pages with more than 1 bar all bars wil
l be hidden
var NavigationBarShowDefault = autoCollapse;

// shows and hides content and picture (if available) of navigation bars
// Parameters:
// indexNavigationBar: the index of navigation bar to be toggled
function toggleNavigationBar(indexNavigationBar)
{
var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);
if (!NavFrame || !NavToggle) {
return false;
}
// if shown now
if (NavToggle.firstChild.data == NavigationBarHide) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if ( hasClass( NavChild, 'NavPic' ) ) {
NavChild.style.display = 'none';
}
if ( hasClass( NavChild, 'NavContent') ) {
NavChild.style.display = 'none';
}
}
NavToggle.firstChild.data = NavigationBarShow;
// if hidden now
} else if (NavToggle.firstChild.data == NavigationBarShow) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if (hasClass(NavChild, 'NavPic')) {
NavChild.style.display = 'block';
}
if (hasClass(NavChild, 'NavContent')) {
NavChild.style.display = 'block';
}
}
NavToggle.firstChild.data = NavigationBarHide;
}
}
// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
var indexNavigationBar = 0;
// iterate over all < div >-elements
var divs = document.getElementsByTagName("div");
for(
var i=0;
NavFrame = divs[i];
i++
) {
// if found a navigation bar
if (hasClass(NavFrame, "NavFrame")) {
indexNavigationBar++;
var NavToggle = document.createElement("a");
NavToggle.className = 'NavToggle';
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' +
indexNavigationBar + ');');
var NavToggleText = document.createTextNode(NavigationBarHide);
NavToggle.appendChild(NavToggleText);
// Find the NavHead and attach the toggle link (Must be this compli
cated because Moz's firstChild handling is borked)
for(
var j=0;
j < NavFrame.childNodes.length;
j++
) {
if (hasClass(NavFrame.childNodes[j], "NavHead")) {
NavFrame.childNodes[j].appendChild(NavToggle);
}
}
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
}
}
// if more Navigation Bars found than Default: hide all
if (NavigationBarShowDefault < indexNavigationBar) {
for(
var i=1;
i<=indexNavigationBar;
i++
) {
toggleNavigationBar(i);
}
}
}
addOnloadHook( createNavigationBarToggleButton );
/** Extra toolbar options ******************************************************
<nowiki>
*
* Description: UNDOCUMENTED
* Maintainers: User:MarkS?, User:Voice of All, User:R. Koot
*/
//This is a modified copy of a script by User:MarkS for extra features added by
User:Voice of All.
// This is based on the original code on Wikipedia:Tools/Editing tools
// To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Specia
l:Mypage/monobook.js]]

if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect
.png",
"speedTip": "Pelencongan",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": "Masukkan teks"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.p
ng",
"speedTip": "Coret",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Teks dicoret"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.pn
g",
"speedTip": "Hentian baris",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/ms/2/23/Button_code.png
",
"speedTip": "Teks kod",
"tagOpen": "<code>",
"tagClose": "</code>",
"sampleText": "Teks kod"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_le
tter.png",
"speedTip": "Superskrip",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Teks superskrip"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_le
tter.png",
"speedTip": "Subskrip",
"tagOpen": "<sub>",
"tagClose": "</sub>",
"sampleText": "Teks subskrip"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/56/Button_big
.png",
"speedTip": "Besar",
"tagOpen": "<big>",
"tagClose": "</big>",
"sampleText": "Teks besar"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/58/Button_sma
ll.png",
"speedTip": "Kecil",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Teks kecil"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_com
ment.png",
"speedTip": "Masukkan komen tersembunyi",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Komen"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.
png",
"speedTip": "Masukkan galeri gambar",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Imej:Contoh.jpg|Sari kata 1\nImej:Contoh.jpg|Sari kata 2"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquo
te.png",
"speedTip": "Sisip blok petikan",
"tagOpen": "<blockquote>\n",
"tagClose": "\n</blockquote>",
"sampleText": "Petikan"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_t
able.png",
"speedTip": "Masukkan sebuah jadual",
"tagOpen": '{| class="wikitable"\n|-\n',
"tagClose": "\n|}",
"sampleText": "! pengatas 1\n! pengatas 2\n! pengatas 3\n|-\n| baris 1, sel
1\n| baris 1, sel 2\n| baris 1, sel 3\n|-\n| baris 2, sel 1\n| baris 2, sel 2\n
| baris 2, sel 3"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_ref
link.png",
"speedTip": "Masukkan rujukan",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Masukkan teks nota kaki di sini"};
}
/*</nowiki>*/

/** "Technical restrictions" title fix *****************************************


*
* Description:
* Maintainers: User:Interiot, User:Mets501
*/
// For pages that have something like Template:Lowercase, replace the title, but
only if it is cut-and-pasteable as a valid wikilink.
// (for instance [[iPod]]'s title is updated. <nowiki>But [[C#]] is not an
equivalent wikilink, so [[C Sharp]] doesn't have its main title changed)</nowik
i>
//
// The function looks for a banner like this: <nowiki>
// <div id="RealTitleBanner"> <!-- div that gets hidden -->
// <span id="RealTitle">title</span>
// </div>
// </nowiki>An element with id=DisableRealTitle disables the function.
var disableRealTitle = 0; // users can disable this by making this
true from their monobook.js
if (wgIsArticle) { // don't display the RealTitle when edit
ing, since it is apparently inconsistent (doesn't show when editing sections, do
esn't show when not previewing)
addOnloadHook(function() {
try {
var realTitleBanner = document.getElementById("RealTitleBanner")
;
if (realTitleBanner && !document.getElementById("DisableRealTitl
e") && !disableRealTitle) {
var realTitle = document.getElementById("RealTitle");
if (realTitle) {
var realTitleHTML = realTitle.innerHTML;
realTitleText = pickUpText(realTitle);
var isPasteable = 0;
//var containsHTML = /</.test(realTitleHTML);
// contains ANY HTML
var containsTooMuchHTML = /</.test( realTitleHTM
L.replace(/<\/?(sub|sup|small|big)>/gi, "") ); // contains HTML that will be ign
ored when cut-n-pasted as a wikilink
// calculate whether the title is pasteable
var verifyTitle = realTitleText.replace(/^ +/, "
"); // trim left spaces
verifyTitle = verifyTitle.charAt(0).toUpperCase(
) + verifyTitle.substring(1, verifyTitle.length); // uppercase first chara
cter
// if the namespace prefix is there, remove it o
n our verification copy. If it isn't there, add it to the original realValue co
py.
if (wgNamespaceNumber != 0) {
if (wgCanonicalNamespace == verifyTitle.
substr(0, wgCanonicalNamespace.length).replace(/ /g, "_") && verifyTitle.charAt(
wgCanonicalNamespace.length) == ":") {
verifyTitle = verifyTitle.substr
(wgCanonicalNamespace.length + 1);
} else {
realTitleText = wgCanonicalNames
pace.replace(/_/g, " ") + ":" + realTitleText;
realTitleHTML = wgCanonicalNames
pace.replace(/_/g, " ") + ":" + realTitleHTML;
}
}
// verify whether wgTitle matches
verifyTitle = verifyTitle.replace(/^ +/, "").rep
lace(/ +$/, ""); // trim left and right spaces
verifyTitle = verifyTitle.replace(/_/g, " ");
// underscores to spaces
verifyTitle = verifyTitle.charAt(0).toUpperCase(
) + verifyTitle.substring(1, verifyTitle.length); // uppercase first chara
cter
isPasteable = (verifyTitle == wgTitle);
var h1 = document.getElementsByTagName("h1")[0];
if (h1 && isPasteable) {
h1.innerHTML = containsTooMuchHTML ? rea
lTitleText : realTitleHTML;
if (!containsTooMuchHTML)
realTitleBanner.style.display =
"none";
}
document.title = realTitleText + " - Wikipedia,
the free encyclopedia";
}
}
} catch (e) {
/* Something went wrong. */
}
});
}

// similar to innerHTML, but only returns the text portions of the insides, excl
udes HTML
function pickUpText(aParentElement) {
var str = "";
function pickUpTextInternal(aElement) {
var child = aElement.firstChild;
while (child) {
if (child.nodeType == 1) // ELEMENT_NODE
pickUpTextInternal(child);
else if (child.nodeType == 3) // TEXT_NODE
str += child.nodeValue;
child = child.nextSibling;
}
}
pickUpTextInternal(aParentElement);
return str;
}
//fix edit summary prompt for undo
//this code fixes the fact that the undo function combined with the "no edit sum
mary prompter" causes problems if leaving the
//edit summary unchanged
//this was added by User:Deskana, code by User:Tra
addOnloadHook(function () {
if (document.location.search.indexOf("undo=") != -1
&& document.getElementsByName('wpAutoSummary')[0]) {
document.getElementsByName('wpAutoSummary')[0].value='';
}
})
/* Sunting bahagian 0 */
var LoadExtraPortlet = true;
var LoadEditTop = true;
function addEdittopPortletLink() {
if(wgCanonicalNamespace == 'Special') return;
if(document.getElementById("wikiPreview")) return;
if(document.getElementById("histlegendâ ")) return;
if(document.getElementById("differenceâ ")) return;
if(document.getElementById("watchdetails")) return;
if ( document.getElementById( "ca-edit" ) ) {
var sElm = document.getElementById( "ca-addsection" ) ? 'ca-addsection' : 'ca
-edit';
var sText = 'â ²';
var sLink = wgScriptPath + "/index.php?title=" + wgPageName +
"&action=edit&section=0";
addPortletLink( 'p-cactions', sLink, sText, 'ca-edittop',
'Sunting bahagian atas laman ini', null, document.getElementById( sElm ).nex
tSibling );
}
}
addOnloadHook( addEdittopPortletLink );
// Notis di [[Wikipedia:Kotak pasir]] dan [[Perbincangan Wikipedia:Kotak pasir]]
(oleh [[Pengguna:Aviator]])
function sandboxNotice() {
notice = document.createElement('div');
document.getElementById('bodyContent').insertBefore(notice, document.getElem
entById('jump-to-nav').nextSibling);
noticeLoader = sajax_init_object();
noticeLoader.open('GET', 'http://ms.wikipedia.org/w/index.php?title=Templat:
Kotak_pasir&action=render', true);
noticeLoader.onreadystatechange = function() {
if (noticeLoader.readyState == 4 && noticeLoader.status == 200) {
notice.innerHTML = noticeLoader.responseText;
}
};
noticeLoader.send('');
}
if (wgAction.match(/view|edit|submit/)) {
addOnloadHook(function() {
if (document.getElementsByTagName('body')[0].className.match(/page-(Perb
incangan_)?Wikipedia_Kotak_pasir/)) {
return sandboxNotice();
}
});
}
/*
==Alatan sunting==
Penyenggara: [[Pengguna:Kurniasan]]
Kod berdasarkan http://fr.wikipedia.org/wiki/MediaWiki:Common.js/edit.js
*/
function menuRuntuhAlatSunting (){
if ( load_edittools != true ) return;
if ( wgPageName != 'MediaWiki:Edittools' && skin == 'vector' ) {
document.getElementById('specialchars').style.display = "none";
}
var alatEdit = document.getElementById("specialchars");
if (!alatEdit) return;
var m = document.createElement('select');
m.setAttribute('style', 'display:inline');
m.onchange = function () { pilihSetAks(this.selectedIndex); };
var p = document.getElementById('specialchars').getElementsByTagName('p');
for (var i = 0; i < p.length ; i++) {
var opt = document.createElement("option");
var txt = document.createTextNode(p[i].title);
opt.appendChild(txt);
m.appendChild(opt);
}
alatEdit.insertBefore(m, alatEdit.childNodes[0]);
//Set aksara piawai (Utama)
pilihSetAks(0);
}
//Mengendalikan peristiwa pilihan ditukar
function pilihSetAks(x) {
var opt = document.getElementById('specialchars').getElementsByTagName('p');
for (var i=0;i<opt.length;i++){
opt[i].style.display = i==x ? 'inline' : 'none';
}
}
//Sertakan menu
addOnloadHook(menuRuntuhAlatSunting);
//Kod untuk tutup bar pilihan kedai kopi pada laman-laman Kedai-kopi
//Penyenggara: [[Pengguna:Kurniasan]]
function ubahSuaiElemen() {
var bTutup = document.getElementById('butangTutup');
if ( !bTutup ) return; //Jika tidak temui elemen, keluar fungsi
bTutup.setAttribute('onmouseout', 'TukarWarnaFon(this.id,0);');
bTutup.setAttribute('onmouseover', 'TukarWarnaFon(this.id,1);');
bTutup.setAttribute('onclick', 'TutupBarKemudi();');
}
function TutupBarKemudi() {
var bar = document.getElementById('barKemudi');
bar.style.display = 'none';
}
function TukarWarnaFon(id,mod) {
var warna = ['#aaa', 'red'];
var target = document.getElementById(id);
target.style.color = warna[mod];
}
addOnloadHook(ubahSuaiElemen);

/** Teks tab laman untuk Laman Utama *****************************************


*
* Huraian: Menukar teks tab laman pada laman utama kepada 'Laman Utama'
* Penyelia: [[Pengguna: Kurniasan]]
*/
function TukarTeksTabL_U(){
if ( wgPageName=='Laman_Utama' && wgNamespaceNumber==0 ) {
document.getElementById('ca-nstab-main').getElementsByTagName('span')[0]
.innerHTML = 'Laman Utama';
}
}
addOnloadHook(TukarTeksTabL_U);
/* MediaWiki:Monobook.js */
/* Sebarang JavaScript di sini akan di muatkan untuk para pengguna yang mengguna
kan kulit MonoBook */
/** Anon tips and donation banner **************************
*
* Description: This implements an anon tips / donation banner. It includes a
workaround for
* the Z-index bug found in Internet Explorer. It correctly place
s the anon notice
* on the page, even under IE6. See this Google search for more i
nformation about the bug:
* http://www.google.com/search?q=z-index+ie6+bug
* Maintainers: [[User:Gmaxwell]], [[User:MZMcBride]]
*/
if(wgUserName == null && skin == 'monobook') addOnloadHook((function (){
if(document.getElementById('siteNotice') || window.siteNoticeValue || window
.wgNotice) return
var message=new Array();
message[0]='<a href="http://wikimediafoundation.org/wiki/Fundraising?sou
rce=enwiki_00" class="extiw" title="wikimedia:Fundraising"><b>Sumbangan anda yan
g berterusan</b></a> membolehkan Wikipedia terus berfungsi!';
message[1]='<a href="http://wikimediafoundation.org/wiki/Fundraising?sou
rce=enwiki_01" class="extiw" title="foundation:Fundraising"><b>Sumbanglah derma<
/b></a> kepada Wikipedia dan berikan hadiah ilmu pengetahuan!';
message[2]='Wikipedia diteruskan berfungsi oleh orang seperti anda. Tolo
nglah <a href="http://wikimediafoundation.org/wiki/Fundraising?source=enwiki_02"
class="extiw" title="foundation:fundraising"><b>menderma</b></a> hari ini.';
message[3]='Bantu kami memajukan Wikipedia dengan <a href="http://wikime
diafoundation.org/wiki/Fundraising?source=enwiki_03" class="extiw" title="founda
tion:Fundraising"><b>menyokongnya dari segi kewangan</b></a>.';
message[4]='Anda boleh <a href="http://wikimediafoundation.org/wiki/Fund
raising?source=enwiki_04" class="extiw" title="wikimedia:Fundraising"><b>menyoko
ng Wikipedia</b></a> dengan membuat derma yang cukainya boleh dipotong.'
message[5]='Bantu kami membekalkan kandungan percuma kepada dunia dengan
<a href="http://wikimediafoundation.org/wiki/Fundraising?source=enwiki_05" clas
s="extiw" title="foundation:Fundraising"><b>menderma hari ini</b></a>!';
message[6]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Researching_
with_Wikipedia" title="Wikipedia:Researching with Wikipedia">Ketahui lebih lanju
t tentang menggunakan Wikipedia untuk kajian.</a>';
message[7]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Ten_things_y
ou_may_not_know_about_Wikipedia" title="Wikipedia:Ten things you may not know ab
out Wikipedia">10 perkara yang mungkin anda tidak ketahui mengenai Wikipedia.</a
>';
message[8]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Ten_things_y
ou_may_not_know_about_images_on_Wikipedia" title="Wikipedia:Ten things you may n
ot know about images on Wikipedia">10 perkara yang mungkin anda tidak ketahui me
ngenai imej-imej di Wikipedia.</a>';
message[9]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Citing_Wikip
edia" title="Wikipedia:Citing Wikipedia">Ketahui lebih lanjut tentang memetik Wi
kipedia.</a>';
message[10]='Have questions? <a href="http://en.wikipedia.org/wiki/Wikip
edia:Questions" title="Wikipedia:Questions">Find out how to ask questions and ge
t answers.</a>';
message[11]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Basic_navig
ation" title="Wikipedia:Basic navigation">Temui lebih lanjut tentang pemanduarah
an Wikipedia dan pencarian maklumat.</a>';
message[12]='<a href="http://en.wikipedia.org/wiki/Wikipedia:Contributin
g_to_Wikipedia" title="Wikipedia:Contributing to Wikipedia">Mempunyai minat untu
k menyumbang di Wikipedia?</a>';
var weightLimit = 6;
var biasPercent = 0.815;
var whichMessage = (Math.random() < biasPercent) ? weightLimit : message.len
gth;

whichMessage = Math.floor(Math.random() * whichMessage);


var wrapper = document.getElementById("globalWrapper");
if (wrapper) {
var div = document.createElement('div');
div.id = "anon-banner";
div.style.cssText = "position:absolute; z-index:40; left:155px; top:1px;
clear:both; float:left; font-size:90%; font-style:italic; white-space:nowrap";
div.innerHTML = message[whichMessage];
wrapper.insertBefore(div, wrapper.firstChild);
}
}));

Vous aimerez peut-être aussi