מדיה ויקי:Common.js: הבדלים בין גרסאות בדף

מתוך ויקישיבה
קפיצה לניווט קפיצה לחיפוש
אין תקציר עריכה
אין תקציר עריכה
שורה 88: שורה 88:
}
}


function addEditButtons()
//<source lang="JavaScript">
{
  /*if( !document.getElementById("toolbar")
/** Extra toolbar options ******************************************************
      return 0;
  addButton("http://www.yeshiva.org.il/wiki/images/c/c8/Button_redirect.png","דף הפניה","#הפניה [[","]]","דף הפניה","mw-editbutton-rd"); */
*  Description: Adds extra buttons to the editing toolbar.
if( document.getElementById("toolbar") )
{
*  To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]].
var sButton = document.createElement("img");
sButton.width = 23;
*  Maintainers: [[User:MarkS]], [[User:Voice of All]], [[User:R. Koot]]
sButton.height = 22;
*/
sButton.src = "images/c/c8/Button_redirect.png";
sButton.border = 0;
if (mwCustomEditButtons) {
sButton.alt = "דף הפניה";
    mwCustomEditButtons.push({
sButton.title = "דף הפניה";
        "imageFile": "wiki/images/c/c8/Button_redirect.png",
sButton.style.cursor = "pointer";
        "speedTip": "דף הפניה",
sButton.onclick = function() {
        "tagOpen": "#הפניה [[",
                insertTags("#", "$", "v");
        "tagClose": "]]",
                return false;
        "sampleText": "שם הדף המופנה"
                };
    });
document.getElementById("toolbar").appendChild( sButton);
}
    mwCustomEditButtons.push({
 
        "imageFile": "wiki/images/d/db/Button_strikeout.png",
 
        "speedTip": "מחוק",
        "tagOpen": "<s>",
        "tagClose": "</s>",
        "sampleText": "טקסט מחוק"
    });
    mwCustomEditButtons.push({
        "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
        "speedTip": "שבירת שורה",
        "tagOpen": "{{ש}}",
        "tagClose": "",
        "sampleText": ""
    });
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/8/80/Button_upper_letter.png",
        "speedTip": "כתב עילי",
        "tagOpen": "<sup>",
        "tagClose": "</sup>",
        "sampleText": "טקסט בכתב עילי"
    });
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/7/70/Button_lower_letter.png",
        "speedTip": "כתב תחתי",
        "tagOpen": "<sub>",
        "tagClose": "</sub>",
        "sampleText": "טקסט בכתב תחתי"
    });
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/5/58/Button_small.png",
        "speedTip": "קטן",
        "tagOpen": "<small>",
        "tagClose": "</small>",
        "sampleText": "טקסט קטן"
    });
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/3/34/Button_hide_comment.png",
        "speedTip": "הערה בלתי נראית",
        "tagOpen": "<!-- ",
        "tagClose": " -->",
        "sampleText": "הערה"
    });
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/c/c4/Button_ref.png",
        "speedTip": "הערת שוליים",
        "tagOpen": "<ref>",
        "tagClose": "</ref>",
        "sampleText": "תוכן הערת השוליים"
    });
}
}
hookEvent("load", addEditButtons);

גרסה מ־15:56, 5 באוגוסט 2009

/* כל סקריפט JavaScript שנכתב כאן ירוץ עבור כל המשתמשים בכל טעינת עמוד */

/*במקור מויקיפדיה*/
   var s = document.createElement('script');
   var url = wgScript + '?action=raw&ctype=text/javascript&title=' + "MediaWiki:Edittoolbar.js";
   s.setAttribute('src',url);
   s.setAttribute('type','text/javascript');
   document.getElementsByTagName('head')[0].appendChild(s);

//importScript("MediaWiki:Edittoolbar.js");

   var m = document.createElement('script');
   var murl = wgScript + '?action=raw&ctype=text/javascript&title=' + "MediaWiki:Makor.js";
   m.setAttribute('src',murl);
   m.setAttribute('type','text/javascript');
   document.getElementsByTagName('head')[0].appendChild(m);

   m = document.createElement('script');
   var murl = "http://www.google-analytics.com/urchin.js";
   m.setAttribute('src',murl);
   m.setAttribute('type','text/javascript');
   document.getElementsByTagName('head')[0].appendChild(m);



/*פלאשים באתר*/
// צריך להיות זהה לצד שרת בקובץ הפונקציות
var count=0; //מספר החלפות
var checks=0; //האם בדקת כבר פרסומת פנימית?
var sZones = "";
var sIDs = "";
var aIDs = [];
function CheckHiRes() {
div = document.getElementById("divHiRes");
	if (div && !checks) {
              sZones+=',77';sIDs+=',divHiRes';
              checks=1;
              }
}
function Final()
{
	CheckHiRes();
	aIDs = sIDs.split(",");
	url="http://click.inn.co.il/infojs.php?&zones_list=" + sZones + "&"+new Date().getTime();
	var scriptElem = document.createElement('script');
	scriptElem.setAttribute('src',url);
	document.getElementsByTagName('head')[0].appendChild(scriptElem);
	if (count<1){window.setTimeout(Final,3000); count++;}
	if (!(count<1) && count<2){window.setTimeout(Final,60000); count++;}
}

function InsertBad(i,bid,cid,zone,type,url,file,ver,height,width) {
	newurl = "http://click.inn.co.il/phpA"+"dsNew/a"+"d";
	newurle = ".php?bannerid="+bid+"&zoneid="+zone+"&clientid="+cid+"&dest="+url;
	fileurl ='http://click.inn.co.il/info_he/'+file;
	clickurl= newurl+"click"+newurle;
	logurl= newurl+"log"+newurle;
	code="";
	switch (type) {
		case "jpeg":case "png":case "gif":
		code="<a href="+clickurl+"><img width="+width+" height="+height+" src="+fileurl+"></a>";
		break;
		case "swf":
		fileurl += "?alink1="+escape(clickurl)+"&atar1=_blank"
		code = "<OBJECT codeBase=http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 height="+height+" width="+width+" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><param name=\"flashvars\" value=\"alink="+fileurl+"\" /><PARAM NAME=Movie VALUE='"+fileurl+"'><PARAM NAME=Src VALUE='"+fileurl+"'><PARAM NAME=WMode VALUE=Transparent><PARAM NAME=Menu VALUE=-1><PARAM NAME=AllowScriptAccess VALUE=never><PARAM NAME=AllowFullScreen VALUE=false><embed src='"+fileurl+"' quality=high wmode='transparent' width='"+width+"' height='"+height+"' type='application/x-shockwave-flash' pluginspace='http://www.adobe.com/go/getflashplayer' allowScriptAccess='never' FlashVars=\"alink="+escape(fileurl)+"\"></embed></OBJECT>";
                break;
		case "html":
		code=file.replace("&#9668;","");
	}
	code+="<img src="+logurl+"&"+new Date().getTime()+" style=display:none>";
	try
        {
	   document.getElementById(aIDs[i]).innerHTML = code;
        }
        catch(e)
        {
           //alert(i +" "+ aIDs[i]+"\n"+ sIDs);
        }
}

sZones = '76,82';sIDs = 'ad1,ad2';Final();

_uacct = 'UA-2997758-1';
urchinTracker();

function writeUs() {
window.open('http://www.yeshiva.org.il/problems/send.asp?refer='+document.URL.replace('&','\*').replace('\'','').replace('\"',''),'','scrollbars=1,resizable=1,width=345,height=410');
}

//<source lang="JavaScript">
 
/** Extra toolbar options ******************************************************
 *  
 *  Description: Adds extra buttons to the editing toolbar.
 *  
 *  To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]].
 *  
 *  Maintainers: [[User:MarkS]], [[User:Voice of All]], [[User:R. Koot]]
 */
 
if (mwCustomEditButtons) {
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/c/c8/Button_redirect.png",
        "speedTip": "דף הפניה",
        "tagOpen": "#הפניה [[",
        "tagClose": "]]",
        "sampleText": "שם הדף המופנה"
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/d/db/Button_strikeout.png",
        "speedTip": "מחוק",
        "tagOpen": "<s>",
        "tagClose": "</s>",
        "sampleText": "טקסט מחוק"
    });
 
    mwCustomEditButtons.push({
         "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
        "speedTip": "שבירת שורה",
        "tagOpen": "{{ש}}",
        "tagClose": "",
        "sampleText": ""
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/8/80/Button_upper_letter.png",
        "speedTip": "כתב עילי",
        "tagOpen": "<sup>",
        "tagClose": "</sup>",
        "sampleText": "טקסט בכתב עילי"
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/7/70/Button_lower_letter.png",
        "speedTip": "כתב תחתי",
        "tagOpen": "<sub>",
        "tagClose": "</sub>",
        "sampleText": "טקסט בכתב תחתי"
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/5/58/Button_small.png",
        "speedTip": "קטן",
        "tagOpen": "<small>",
        "tagClose": "</small>",
        "sampleText": "טקסט קטן"
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/3/34/Button_hide_comment.png",
        "speedTip": "הערה בלתי נראית",
        "tagOpen": "<!-- ",
        "tagClose": " -->",
        "sampleText": "הערה"
    });
 
    mwCustomEditButtons.push({
        "imageFile": "wiki/images/c/c4/Button_ref.png",
        "speedTip": "הערת שוליים",
        "tagOpen": "<ref>",
        "tagClose": "</ref>",
        "sampleText": "תוכן הערת השוליים"
    });
}