הבדלים בין גרסאות בדף "מדיה ויקי:Mobile.js"
קפיצה לניווט
קפיצה לחיפוש
שורה 2: | שורה 2: | ||
window.onload=function(){ | window.onload=function(){ | ||
var d1 = document.getElementById( 'mw-mf-page-left' ).getElementsByTagName( 'ul' )[0]; | var d1 = document.getElementById( 'mw-mf-page-left' ).getElementsByTagName( 'ul' )[0]; | ||
− | d1.insertAdjacentHTML('beforeend', '<li><a href="/wiki/פורטלים" class="icon-portal icon icon-text" id="portalButton">פורטלים</a></li><li><a href="/blog" class="icon-blog icon icon-text" id="blogButton">בלוג</a></li><li><a href="/wiki/ייעוץ_אסטרטגי" class="icon-strat icon icon-text" id="stratButton">ייעוץ אסטרטגי</a></li><li><a href="/wiki/קורסים_והכשרות" class="icon-course icon icon-text" id="courseButton">קורסים והכשרות</a></li><li><a href="/#contact" class="icon-contact icon icon-text" id="contactButton">צור קשר</a></li><li id="contact-icons"><a href="tel:+ | + | d1.insertAdjacentHTML('beforeend', '<li><a href="/wiki/פורטלים" class="icon-portal icon icon-text" id="portalButton">פורטלים</a></li><li><a href="/blog" class="icon-blog icon icon-text" id="blogButton">בלוג</a></li><li><a href="/wiki/ייעוץ_אסטרטגי" class="icon-strat icon icon-text" id="stratButton">ייעוץ אסטרטגי</a></li><li><a href="/wiki/קורסים_והכשרות" class="icon-course icon icon-text" id="courseButton">קורסים והכשרות</a></li><li><a href="/#contact" class="icon-contact icon icon-text" id="contactButton">צור קשר</a></li><li id="contact-icons"><a href="tel:+972544702895" class="icon-phone icon-text" id="phoneButton"></a><a href="//www.facebook.com/doalogue" class="icon-facebook icon-text" id="FBButton"></a><a href="//twitter.com/doalogue" class="icon-twitter icon-text" id="twitterButton"></a><a href="//linkedin.com/company/doalogue" class="icon-linkedin icon-text" id="twitterButton"></a></li>'); |
} | } | ||
// banner | // banner |
גרסה מ־01:24, 2 בינואר 2018
// menu
window.onload=function(){
var d1 = document.getElementById( 'mw-mf-page-left' ).getElementsByTagName( 'ul' )[0];
d1.insertAdjacentHTML('beforeend', '<li><a href="/wiki/פורטלים" class="icon-portal icon icon-text" id="portalButton">פורטלים</a></li><li><a href="/blog" class="icon-blog icon icon-text" id="blogButton">בלוג</a></li><li><a href="/wiki/ייעוץ_אסטרטגי" class="icon-strat icon icon-text" id="stratButton">ייעוץ אסטרטגי</a></li><li><a href="/wiki/קורסים_והכשרות" class="icon-course icon icon-text" id="courseButton">קורסים והכשרות</a></li><li><a href="/#contact" class="icon-contact icon icon-text" id="contactButton">צור קשר</a></li><li id="contact-icons"><a href="tel:+972544702895" class="icon-phone icon-text" id="phoneButton"></a><a href="//www.facebook.com/doalogue" class="icon-facebook icon-text" id="FBButton"></a><a href="//twitter.com/doalogue" class="icon-twitter icon-text" id="twitterButton"></a><a href="//linkedin.com/company/doalogue" class="icon-linkedin icon-text" id="twitterButton"></a></li>');
}
// banner
$( document ).ready(function(){
$('head').append('<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" type="text/css" /><meta name="theme-color" content="#52A3F6"><meta name="msapplication-navbutton-color" content="#52A3F6"><meta name="apple-mobile-web-app-status-bar-style" content="#52A3F6">');
if ($('#image-banner').length > 0) {
$('#image-banner').css('background-image', 'url(' + $('.image img').attr('src') + ')').css('opacity', '1');
var PageHead = document.getElementById("section_0");
// Copy the element and its child nodes
var clnPageHead = PageHead.cloneNode(true);
var PageHeader = document.getElementById("image-banner");
var clnPageHeader = PageHeader.cloneNode(true);
if ($('.image').length > 0) {
document.getElementById("image-banner").remove();
$(".header").after(clnPageHeader);
document.getElementById("section_0").remove();
document.getElementById("newHeading").appendChild(clnPageHead);
}
}
});
if (typeof jQuery != 'undefined') {
jQuery(document).ready(function($) {
var filetypes = /\.(zip|exe|dmg|pdf|doc.*|xls.*|ppt.*|mp3|txt|rar|wma|mov|avi|wmv|flv|wav)$/i;
var baseHref = '';
if (jQuery('base').attr('href') != undefined) baseHref = jQuery('base').attr('href');
jQuery('a').on('click', function(event) {
var el = jQuery(this);
var track = true;
var href = (typeof(el.attr('href')) != 'undefined' ) ? el.attr('href') :"";
var isThisDomain = href.match(document.domain.split('.').reverse()[1] + '.' + document.domain.split('.').reverse()[0]);
if (!href.match(/^javascript:/i)) {
var elEv = []; elEv.value=0, elEv.non_i=false;
if (href.match(/^mailto\:/i)) {
elEv.category = "email";
elEv.action = "click";
elEv.label = href.replace(/^mailto\:/i, '');
elEv.loc = href;
}
else if (href.match(filetypes)) {
var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined;
elEv.category = "download";
elEv.action = "click-" + extension[0];
elEv.label = href.replace(/ /g,"-");
elEv.loc = baseHref + href;
}
else if (href.match(/^https?\:/i) && !isThisDomain) {
elEv.category = "external";
elEv.action = "click";
elEv.label = href.replace(/^https?\:\/\//i, '');
elEv.non_i = true;
elEv.loc = href;
}
else if (href.match(/^tel\:/i)) {
elEv.category = "telephone";
elEv.action = "click";
elEv.label = href.replace(/^tel\:/i, '');
elEv.loc = href;
}
else track = false;
if (track) {
_gaq.push(['_trackEvent', elEv.category.toLowerCase(), elEv.action.toLowerCase(), elEv.label.toLowerCase(), elEv.value, elEv.non_i]);
if ( el.attr('target') == undefined || el.attr('target').toLowerCase() != '_blank') {
setTimeout(function() { location.href = elEv.loc; }, 400);
return false;
}
}
}
});
});
}