משתמש:שי שי שי/a.js
מתוך ויקיפדיה, האנציקלופדיה החופשית
הערה: לאחר השמירה, עליכם לנקות את זכרון המטמון (Cache) של הדפדפן על־מנת להבחין בשינויים.
- באינטרנט אקספלורר, לחצו על מקש ה־Ctrl בעת לחיצתכם על רענן (Refresh), או הקישו על Ctrl+F5.
- במוזילה, פיירפוקס או ספארי, לחצו על מקש ה־Shift בעת לחיצתכם על העלה מחדש (Reload), או הקישו Ctrl+Shift+R (או Cmd+Shift+R במקינטוש של אפל).
- ב־Konqueror, לחצו על העלה מחדש (Reload), או הקישו על F5.
- באופרה, ייתכן שתצטרכו להשתמש בכלים (Tools) > העדפות (Preferences) כדי לנקות לחלוטין את זכרון המטמון.
// שורת לשוניות נוספת, בתחתית העמוד - קוד שהעתקתי ממטא, ואין לי מושג למי לתת קרדיט function morelinks() { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs); } if (window.addEventListener) window.addEventListener("load",morelinks,false); else if (window.attachEvent) window.attachEvent("onload",morelinks); //לחצן לביצוע ויקיזציה - עבודה מעולה של [[משתמש:ערן|ערן]] function Html2WikiInstallation() { copywarn = document.getElementById('editpage-copywarn'); if (copywarn != null) { var cleaner = "<br style=\\'clear:both;\\' />"; LivePreviewHTML = '<input type="button" value="HTML2Wiki" onclick="document.getElementById(\'PreviewBox\').innerHTML = wiki2html() + \'' + cleaner + '\';" />'; copywarn.innerHTML = LivePreviewHTML + copywarn.innerHTML; } } function wiki2html() { txt = document.editform.wpTextbox1.value; txt = txt.replace(/\<\/?(b|strong)\>/g, "\'\'\'"); txt = txt.replace(/\<\/?(i|em)\>/g, "\'\'"); atab = txt.indexOf("<table",0); while(atab!=-1){ btab = txt.indexOf(">",atab); str1=txt.substring(0,btab); str2=txt.substring(btab+1,txt.length); txt=str1+str2; atab = txt.indexOf("<table",btab); } atab = txt.indexOf("<table",0); while(atab!=-1){ txt=txt.replace("<table","\n{|"); atab = txt.indexOf("<table",atab+1); } atab = txt.indexOf("</table>",0); while(atab!=-1){ txt=txt.replace("</table>","\n|}"); atab = txt.indexOf("</table",atab+1); } atab = txt.indexOf("<tr",0); while(atab!=-1){ btab = txt.indexOf(">",atab); str1=txt.substring(0,btab); str2=txt.substring(btab+1,txt.length); txt=str1+"\n"+str2; atab = txt.indexOf("<tr",btab); } atab = txt.indexOf("<tr",0); while(atab!=-1){ txt=txt.replace("<tr","|-"); atab = txt.indexOf("<tr",atab+1); } atab = txt.indexOf("</tr>",0); while(atab!=-1){ txt=txt.replace("</tr>",""); atab = txt.indexOf("</tr",atab+1); } atab = txt.indexOf("<td>",0); while(atab!=-1){ txt=txt.replace("<td>","|"); atab = txt.indexOf("<td>",atab+1); } atab = txt.indexOf("<td",0); while(atab!=-1){ btab = txt.indexOf(">",atab); str1=txt.substring(0,btab); str2=txt.substring(btab+1,txt.length); txt=str1+"|"+str2; atab = txt.indexOf("<td",btab); } atab = txt.indexOf("<td",0); while(atab!=-1){ txt=txt.replace("<td","|"); atab = txt.indexOf("<td",atab+1); } atab = txt.indexOf("</td>",0); while(atab!=-1){ txt=txt.replace("</td>",""); atab = txt.indexOf("</td",atab+1); } atab = txt.indexOf("<th",0); while(atab!=-1){ btab = txt.indexOf(">",atab); str1=txt.substring(0,btab); str2=txt.substring(btab+1,txt.length); txt=str1+"|"+str2; atab = txt.indexOf("<th",btab); if (btab==-1) atab=-1; } atab = txt.indexOf("<th",0); while(atab!=-1){ txt=txt.replace("<th","!"); atab = txt.indexOf("<th",atab+1); } atab = txt.indexOf("</th>",0); while(atab!=-1){ txt=txt.replace("</th>",""); atab = txt.indexOf("</th",atab+1); } document.editform.wpTextbox1.value = txt; } window.onload = Main; function Main() { Html2WikiInstallation(); }