מדיה ויקי:Gadget-editIntro.js
מתוך ויקיציטוט, מאגר הציטוטים החופשי.
הערה: לאחר השמירה, עליכם לנקות את זכרון המטמון (Cache) של הדפדפן על־מנת להבחין בשינויים.
- במוזילה, בפיירפוקס או בספארי, לחצו על מקש ה־Shift בעת לחיצתכם על העלה מחדש (Reload), או הקישו Ctrl+Shift+R (או Cmd+Shift+R במקינטוש של אפל).
- באינטרנט אקספלורר, לחצו על מקש ה־Ctrl בעת לחיצתכם על רענן (Refresh), או הקישו על Ctrl+F5.
- ב־Konqueror, לחצו על העלה מחדש (Reload), או הקישו על F5.
- באופרה, ייתכן שתצטרכו להשתמש בכלים (Tools) > העדפות (Preferences) כדי לנקות לחלוטין את זכרון המטמון.
// // מועתק במקור מ[[w:ויקיפדיה:סקריפטים/12]] // הסקריפט מוסיף אפשרות לערוך את ההקדמה של הערך // function addEditSection0() { x = document.getElementById('ca-edit'); if (!x) return; ta['ca-edit-0'] = ['', 'ערוך את ההקדמה']; y = document.createElement('LI'); y.id = 'ca-edit-0'; // if is edit page and is section 0, then mark "0" as seleted and mark "עריכה" as unseleted var isSelected = (x.className.indexOf('selected') != -1); var isTalk = (x.className.indexOf('istalk') != -1); var isSection0 = (/&action=edit§ion=0$/.test(window.location.href)); //alert(isSelected + " " + isTalk + " " + isSection0); if (isSelected) { if (isSection0) { y.className = x.className; x.className = (isTalk) ? 'istalk' : ''; } else { if (isTalk) y.className = 'istalk'; } } // add the "0" li element var z = document.createElement('A'); z.href = x.childNodes[0].href + '§ion=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); x.parentNode.insertBefore(y,x.nextSibling); // add summary if editing section 0 if ( isSection0 ) document.getElementById("wpSummary").value = "/* עריכת ההקדמה */ "; } addOnloadHook(addEditSection0);