משתמש:Roybb95/monobook.js

מתוך ויקיפדיה, האנציקלופדיה החופשית

הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.

  • פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
  • גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
  • אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
  • אופרה: ללחוץ על Ctrl-F5.
// שורת לשוניות נוספת, בתחתית העמוד - קוד שהעתקתי ממטא, ואין לי מושג למי לתת קרדיט

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;
}



*/