MediaWiki:Common.js: Revizyonlar arasındaki fark

Wiki The-West TR sitesinden
Gezintiye git
Değişiklik özeti yok
Değişiklik özeti yok
40. satır: 40. satır:
         elementToMove.insertAfter("#mirage-fixed-header");
         elementToMove.insertAfter("#mirage-fixed-header");
     });
     });
})(jQuery);
(function($) {
$(document).ready(function() {
$('.quickSearchQuest').append('<span class="textfield_wrapper textfield_flex"><span class="textfield_label"></span><span class="textfield"><span><input type="text" id="QsearchBox" placeholder="Quick Search Quest"></span></span></span>');
});
})(jQuery);
})(jQuery);



18.57, 9 Eylül 2023 tarihindeki hâli

/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */

$('.tbbox-logo').wrap('<a href="/wiki/Ana_sayfa"></a>');
if ($('.item_container').length!==0) {
    $('.item_container').each(function() {
        $(this).append('<img src="https://westtr.innogamescdn.com/images/items/' + $(this).attr('data-url') + '?1">');
    });
    $.getScript("/wiki/Popup.js?action=raw");
}

$(window).scroll(function() {
    if ($(this).scrollTop() > 300) {
        $('#back-top').fadeIn();
    } else {
        $('#back-top').fadeOut();
    }
});
// Scroll body to top on click
$('#back-top a').click(function() {
    $('body,html').animate({
        scrollTop: 0
    }, 800);
    return false;
});
// Embed youtube videos
if ($('.youtube_video').length !== 0) {
    $('.youtube_video').each(function() {
        $(this).html('<iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + $(this).attr('data-id') + '?cc_load_policy=1&cc_lang_pref=' + $(this).attr('data-subtitles') + '" frameborder="0" allowfullscreen></iframe>');
    });
}
mw.config.set('tableSorterCollation',{'ı':'ç','ö':'ü','ş':'ğ','Ç':'Ş','Ğ':'Ö','Ü':'İ'});

//crafting
if($('.target_input').length){$('.target_input p').each(function(){var id=$(this).attr('id');var phrase=$(this).text();var newInput="<input type='number' name='input_new' value='"+
phrase+"' class='target' max='50000' min='' />";$(this).replaceWith(newInput);});var multiplierValue=1;var currentAmountsArray=[];$('.amount').each(function(index){currentAmountsArray[index]=parseInt($(this).text());});$("input[name='input_new']").on('input paste keyup',function(){this.value>50000?(this.value=50000):this.value<0&&(this.value=0);multiplierValue=this.value;$('.amount').each(function(index){$(this).text(currentAmountsArray[index]*multiplierValue);});$('.craft_extra').show();$('.craft_extra .item_container').each(function(){$(this).children().addClass('OverlayItem');});});}

(function($) {
    $(document).ready(function() {
        var elementToMove = $("#module-site-navigation").detach();
        elementToMove.insertAfter("#mirage-fixed-header");
    });
})(jQuery);

(function($) {
	$(document).ready(function() {
		$('.quickSearchQuest').append('<span class="textfield_wrapper textfield_flex"><span class="textfield_label"></span><span class="textfield"><span><input type="text" id="QsearchBox" placeholder="Quick Search Quest"></span></span></span>');
	});
})(jQuery);



(function($) {
    $(document).on('click', '.dock-toggler', function() {
        const dockItems = $('.dock-items-container');
        const toggler = $('.dock-toggler');
        const toggleDockIcon = $('.toggle-dock');

        dockItems.toggleClass('toggled');
        toggler.toggleClass('toggled');
        toggleDockIcon.toggleClass('toggled');
    });
})(jQuery);

$(document).ready(function() {
	
	//var currentUrl = window.location.pathname.split('/').pop();
	//
	//if (currentUrl == 'Main_Page') {
	//	$.getScript("/wiki/QuestsCalendar.js?action=raw", function() {
	//		// Script loaded
	//	});	
	//}
	//
	//if (currentUrl == 'Category:Questlines') {
	//	$.getScript("/wiki/Quests.js?action=raw", function() {
	//		// Script loaded
	//	});
	//}

    $('body').append($('<div></div>').load('https://wiki.the-west.org/wiki/Dock.html?action=raw'));

    if ($('.item_container').length !== 0) {
        $('.item_container').each(function() {
            $(this).append('<img src="https://westzz.innogamescdn.com/images/items/' + $(this).attr('data-url') + '?1">');
        });
        $.getScript("/wiki/Popup.js?action=raw");
    }
});