|
|
| (24 גרסאות ביניים של 7 משתמשים אינן מוצגות) |
| שורה 1: |
שורה 1: |
| function alertProtected() {
| | /*This is old script for adding {{protected}} automaticlly. */ |
| if ((wgRestrictionEdit[0] == 'sysop' || wgRestrictionEdit[0] == 'autoconfirmed') && wgPageName != 'עמוד_ראשי') {
| |
| | |
| var alertLink = '<a href="/wiki/';
| |
| alertLink += encodeURIComponent((wgNamespaceNumber == 0) ? 'שיחה:' : 'שיחת ');
| |
| alertLink += encodeURIComponent(wgPageName);
| |
| alertLink += '" title="';
| |
| alertLink += (wgNamespaceNumber == 0) ? 'שיחה:' : 'שיחת ';
| |
| alertLink += wgPageName;
| |
| alertLink += '">דף השיחה</a>';
| |
| | |
| // create alert
| |
| var plTD1 = document.createElement('TD');
| |
| plTD1.style.marginRight = '1em';
| |
| plTD1.style.marginLeftt = '1em';
| |
| plTD1.style.textAlign = 'center';
| |
| plTD1.style.verticalAlign = 'middle';
| |
| plTD1.style.width = '75px';
| |
| plTD1.innerHTML = '<a href="/wiki/%D7%AA%D7%9E%D7%95%D7%A0%D7%94:Lock-icon.png" class="image" title="Lock-icon.png"><img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Lock-icon.png/50px-Lock-icon.png" width="50" height="48" border="0" /></a>';
| |
| var plTD2 = document.createElement('TD');
| |
| plTD2.style.textAlign = 'right';
| |
| | |
| var plProtected = 0; // 0 = sysop; 1 = autoconfirmed
| |
| var alertTxt;
| |
| | |
| // deal with sysop protection
| |
| if (wgRestrictionEdit[0] == 'sysop') {
| |
| // avoid articles which have the protection template
| |
| if (document.getElementById('pl-protected')) return;
| |
| | |
| // attach the text
| |
| plTD2.innerHTML = '<b><a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%A3_%D7%9E%D7%95%D7%92%D7%9F" title="ויקיפדיה:דף מוגן">דף זה מוגן מפני עריכות</a></b><br /><a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%9E%D7%A4%D7%A2%D7%99%D7%9C_%D7%9E%D7%A2%D7%A8%D7%9B%D7%AA" title="ויקיפדיה:מפעיל מערכת">מפעילי המערכת</a> נאלצו להפוך דף זה ל<a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%A3_%D7%9E%D7%95%D7%92%D7%9F" title="ויקיפדיה:דף מוגן">דף מוגן</a> מפני עריכות. לפרטים וסיבות עיינו בדף הגרסאות הקודמות וב' + alertLink + '.<br />אם אתם סבורים שיש לשנות את תוכן הערך (להוסיף מידע, להסיר מידע, או כל שינוי אחר), אנא ציינו זאת ב' + alertLink + ', ושם גם המקום לטעון שהדף אינו צריך להיות מוגן.';
| |
| | |
| } else { // deal with autoconfirmed protection
| |
| plProtected = 1;
| |
| | |
| // avoid articles which have the protection template
| |
| if (document.getElementById('pl-autoconfirmed')) return;
| |
| | |
| // attach the text
| |
| plTD2.innerHTML = '<b><a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%A3_%D7%9E%D7%95%D7%92%D7%9F" title="ויקיפדיה:דף מוגן">דף זה מוגן</a></b> ויכולים לערוך אותו רק <a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%9D" title="ויקיפדיה:ויקיפדים">ויקיפדים</a> בעלי ותק של ארבעה ימים לפחות.<br />לפרטים וסיבות עיינו בדף הגרסאות הקודמות וב' + alertLink + '.<br />אם אתם סבורים שיש לשנות את תוכן הערך, אנא ציינו זאת ב' + alertLink + '.';
| |
| | |
| }
| |
| | |
| var plTR = document.createElement('TR');
| |
| plTR.appendChild(plTD1);
| |
| plTR.appendChild(plTD2);
| |
| var plTBody = document.createElement('TBODY');
| |
| plTBody.appendChild(plTR);
| |
| var plTable = document.createElement('TABLE');
| |
| plTable.className = 'ambox';
| |
| plTable.align = 'center';
| |
| plTable.style.border = '1px solid #AFAFAF';
| |
| plTable.style.backgroundColor = '#FFFFFF';
| |
| plTable.style.width = '75%';
| |
| plTable.style.marginTop = '5px';
| |
| plTable.style.marginBottom = '5px';
| |
| plTable.style.padding = '.2em';
| |
| plTable.style.textAlign = 'center';
| |
| plTable.style.claer = 'both';
| |
| plTable.appendChild(plTBody);
| |
| | |
| var attachHere = document.getElementById('catlinks');
| |
| if (!attachHere) attachHere = getElementByClassName('printfooter');
| |
| attachHere.parentNode.insertBefore(plTable, attachHere);
| |
| | |
| // attach the icon
| |
| var iconTxt = '<div class="toplink" style="left: 35px;"><div style="position: relative;"><a href="/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%A3_%D7%9E%D7%95%D7%92%D7%9F" title="דף זה מוגן' + (plProtected ? ' חלקית' : ' מפני עריכה') + '"><img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Lock-icon.png/25px-Lock-icon.png" width="25" height="24" border="0" /></a></div></div>';
| |
| | |
| attachHere.parentNode.innerHTML += iconTxt;
| |
| }
| |
| }
| |
| | |
| addOnloadHook(alertProtected);
| |