MediaWiki:Common.js: Διαφορά μεταξύ των αναθεωρήσεων

Από Wiki The-West GR
Jump to navigation
Χωρίς σύνοψη επεξεργασίας
Χωρίς σύνοψη επεξεργασίας
Γραμμή 4: Γραμμή 4:
     var script = '<script>window.location.replace("https://wiki.the-west.gr/wiki/%CE%94%CE%B5%CE%BD_%CE%AD%CF%87%CE%B5%CF%84%CE%B5_%CE%B1%CF%81%CE%BA%CE%B5%CF%84%CE%AC_%CE%B4%CE%B9%CE%BA%CE%B1%CE%B9%CF%8E%CE%BC%CE%B1%CF%84%CE%B1");</script>';
     var script = '<script>window.location.replace("https://wiki.the-west.gr/wiki/%CE%94%CE%B5%CE%BD_%CE%AD%CF%87%CE%B5%CF%84%CE%B5_%CE%B1%CF%81%CE%BA%CE%B5%CF%84%CE%AC_%CE%B4%CE%B9%CE%BA%CE%B1%CE%B9%CF%8E%CE%BC%CE%B1%CF%84%CE%B1");</script>';


     if(document.cookie.indexOf('west_grUserName') == -1 ) {
     if(document.cookie.indexOf("west_grUserName") == -1 ) {
         $('#ca-viewsource, #ca-nstab-user, #ca-talk, #ca-history, #ca-watch, #ca-unwatch, #p-personal.portal, #p-tb.portal').remove();
         $('#ca-viewsource, #ca-nstab-user, #ca-talk, #ca-history, #ca-watch, #ca-unwatch, #p-personal.portal, #p-tb.portal').remove();
         $('.tbbox-rule').last().remove();
         $('.tbbox-rule').last().remove();

Αναθεώρηση της 12:25, 25 Απριλίου 2022

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function(){
    var script = '<script>window.location.replace("https://wiki.the-west.gr/wiki/%CE%94%CE%B5%CE%BD_%CE%AD%CF%87%CE%B5%CF%84%CE%B5_%CE%B1%CF%81%CE%BA%CE%B5%CF%84%CE%AC_%CE%B4%CE%B9%CE%BA%CE%B1%CE%B9%CF%8E%CE%BC%CE%B1%CF%84%CE%B1");</script>';

    if(document.cookie.indexOf("west_grUserName") == -1 ) {
        $('#ca-viewsource, #ca-nstab-user, #ca-talk, #ca-history, #ca-watch, #ca-unwatch, #p-personal.portal, #p-tb.portal').remove();
        $('.tbbox-rule').last().remove();
        $('.tbbox-rule').last().remove();
        
        if (window.location.href.indexOf("%CE%B4%CE%B9%CE%BA%CE%B1%CE%B9%CF%8E%CE%BC%CE%B1%CF%84%CE%B1") > -1) {
            $('.mw-redirectedfrom').remove();
        };
        
    };
});
if($(".tbbox-logo").wrap('<a href="/wiki/Αρχική_σελίδα"></a>'),$(document).ready(function(){$(".clignote a").removeAttr("title"),$(".sb_link a").hover(function(t){var o=$(this).html();$(this).attr("custom-title",o)}),$("[title]").hover(function(t){var o=$(this).attr("title");$(this).attr("custom-title",o),$(this).removeAttr("title")}),oPui={toolup:{content:"",delay:200,active:!1,show:function(t){oPui.toolup.content=oPui.toolup.createPopup($(t).attr("custom-title")),oPui.toolup.active=!0,oPui.toolup.setTimeout(),oPui.toolup.getContainer().html(oPui.toolup.content)},hide:function(){oPui.toolup.getEl().css({display:"none",top:0,left:0}),oPui.toolup.active=!1,oPui.toolup.clearTimeout()},setTimeout:function(){oPui.toolup.clearTimeout(),oPui.toolup.timer=window.setTimeout(function(){oPui.toolup.getEl().css("display","block")},oPui.toolup.delay)},clearTimeout:function(){oPui.toolup.timer&&window.clearTimeout(oPui.toolup.timer)},getEl:function(){return $(".overlay-popup")},getContainer:function(){return $(".overlay-contents")},createPopup:function(t){return'<div class="oPtitle">'+t+"</div>"},setPosition:function(t){var o,e,i=$(window).width(),n=$(window).height(),l=oPui.toolup.getEl().outerWidth(),u=oPui.toolup.getEl().outerHeight(),a=t.clientX,c=t.clientY;e=a+l+20>i?a-l-20+(t.pageX-t.clientX):a+20+(t.pageX-t.clientX),o=c+u+20>n?n-u+(t.pageY-t.clientY):c+20+(t.pageY-t.clientY),oPui.toolup.getEl().css({top:o,left:e})},init:function(){$("body").append('<div class="overlay-popup"><div class="popup_front"><div class="tw_bg_tl"></div><div class="tw_bg_tr"></div><div class="tw_bg_bl"></div><div class="tw_bg_br"></div></div><div class="overlay-contents"></div></div>'),$(document).on("mouseenter","[custom-title]",function(t){oPui.toolup.show(this),oPui.toolup.setPosition(t)}),$(document).on("mouseleave","[custom-title]",function(){oPui.toolup.hide()}),$(document).on("mousemove","[custom-title]",function(t){oPui.toolup.setPosition(t)}),$(".item_level").mousedown(function(t){t.preventDefault()})}},init:function(){oPui.toolup.init()}},oPui.init()}),0!==$(".item_container").length&&($(".item_container").each(function(){$(this).append('<img src="https://westgr.innogamescdn.com/images/items/'+$(this).attr("data-url")+'">')}),$.getScript("https://wiki.the-west.gr/wiki/Popup.js?action=raw")),$(window).scroll(function(){$(this).scrollTop()>100?$("#back-top").fadeIn():$("#back-top").fadeOut()}),$("#back-top a").click(function(){return $("body,html").animate({scrollTop:0},800),!1}),0!==$("#navbar").length&&$("#navbar a").removeAttr("title"),0!==$(".youtube_video").length&&$(".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",{"à":"a","â":"a","æ":"ae","é":"e","è":"e","ê":"e","î":"i","ï":"i","ô":"o","œ":"oe","û":"u","ç":"c"}),0!==$("#calcLvlLoss").length){var context=$("#calcLvlLoss"),input_character_level=$('<input type="number" style="width:150px;" class="west" placeholder="Επίπεδο χαρακτήρα" min="0" max="150">').bind("propertychange keyup input paste",function(){this.value>150?this.value=150:this.value<0&&(this.value=0),calcLvlLoss()}).appendTo(context.find(".character_level")),input_duel_level=$('<input type="number" style="width:150px;" class="west" placeholder="Επίπεδο μονομαχίας" min="0" max="450">').bind("propertychange keyup input paste",function(){this.value>450?this.value=450:this.value<0&&(this.value=0),calcLvlLoss()}).appendTo(context.find(".duel_level"));function calcLvlLoss(){var t=parseInt(input_duel_level.val()),o=parseInt(input_character_level.val());if(isNaN(t)||isNaN(o)||t<o)context.find(".result").html("");else{var e=function(t){return Math.ceil(Math.pow(t/.1,1/.6))},i=function(t,e){return o+Math.floor(.1*Math.pow(t*(e||1),.6))},n=e(t-o),l=450===t?"∞":e(t+1-o),u=i(n,.9),a=450===t?450:i(l,.9);context.find(".result").html("Τρέχουσα εμπειρία μονομαχίας: <b><i>"+n+"</b></i> - <b><i>"+l+"</b></i><br/>Επίπεδο μονομαχίας μετά τη λήψη του φίλτρου: <b><i>"+u+(a>u?"</b></i> - <b><i>"+a:""))}}}