MediaWiki:Common.js: Difference between revisions

From Rinchen Terdzö
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
 
(94 intermediate revisions by 3 users not shown)
Line 1: Line 1:
mw.loader.load( 'https://fonts.googleapis.com/css?family=Crimson+Text:400,400i,700', 'text/css' );
$('#bios-trigger').hover( function() { $('#bios-back').show(); }, function() { $('#bios-back').hide(); });
mw.loader.load( 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css', 'text/css' );
$('#bios-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Biographies'; })
mw.loader.load( 'https://use.fontawesome.com/bd289233d5.js' );
$('#indexes-trigger').hover( function() { $('#indexes-back').show(); }, function() { $('#indexes-back').hide(); });
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css', 'text/css' );
$('#indexes-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Indexes_and_Lineage_Histories'; })
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js' );
$('#maha-trigger').hover( function() { $('#maha-back').show(); }, function() { $('#maha-back').hide(); });
mw.loader.load( 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js' );
$('#maha-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Mahayoga'; })
mw.loader.load( 'https://code.jquery.com/jquery-3.2.1.slim.min.js' );
$('#anu-trigger').hover( function() { $('#anu-back').show(); }, function() { $('#anu-back').hide(); });
 
$('#anu-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Anuyoga'; })
 
$('#ati-trigger').hover( function() { $('#ati-back').show(); }, function() { $('#ati-back').hide(); });
 
$('#ati-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Atiyoga'; })
function BrowserDetection() {
$('#sup-trigger').hover( function() { $('#sup-back').show(); }, function() { $('#sup-back').hide(); });
    //Check if browser is IE
$('#sup-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Supplementary_Volumes'; })
    if (navigator.userAgent.search("MSIE") & gt; = 0) {
$('#ill-trigger').hover( function() { $('#ill-back').show(); }, function() { $('#ill-back').hide(); });
        // insert conditional IE code here
$('#ill-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/RTZ_Volume_72'; })
    }
$('#out-trigger').hover( function() { $('#out-back').show(); }, function() { $('#out-back').hide(); });
    //Check if browser is Chrome
$('#out-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/RTZ_Outline'; })
    else if (navigator.userAgent.search("Chrome") & gt; = 0) {
        // insert conditional Chrome code here
    }
    //Check if browser is Firefox
    else if (navigator.userAgent.search("Firefox") & gt; = 0) {
        // insert conditional Firefox Code here
    }
    //Check if browser is Safari
    else if (navigator.userAgent.search("Safari") & gt; = 0 & amp; & amp; navigator.userAgent.search("Chrome") & lt; 0) {
        function(){ $('#navbar-main').css('background','rgba(16, 55, 82, 0.62)') };
    }
    //Check if browser is Opera
    else if (navigator.userAgent.search("Opera") & gt; = 0) {
        // insert conditional Opera code here
    }
}

Latest revision as of 15:47, 6 March 2024

$('#bios-trigger').hover( function() { $('#bios-back').show(); }, function() { $('#bios-back').hide(); });
$('#bios-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Biographies'; })
$('#indexes-trigger').hover( function() { $('#indexes-back').show(); }, function() { $('#indexes-back').hide(); });
$('#indexes-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Indexes_and_Lineage_Histories'; })
$('#maha-trigger').hover( function() { $('#maha-back').show(); }, function() { $('#maha-back').hide(); });
$('#maha-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Mahayoga'; })
$('#anu-trigger').hover( function() { $('#anu-back').show(); }, function() { $('#anu-back').hide(); });
$('#anu-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Anuyoga'; })
$('#ati-trigger').hover( function() { $('#ati-back').show(); }, function() { $('#ati-back').hide(); });
$('#ati-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Atiyoga'; })
$('#sup-trigger').hover( function() { $('#sup-back').show(); }, function() { $('#sup-back').hide(); });
$('#sup-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/Supplementary_Volumes'; })
$('#ill-trigger').hover( function() { $('#ill-back').show(); }, function() { $('#ill-back').hide(); });
$('#ill-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/RTZ_Volume_72'; })
$('#out-trigger').hover( function() { $('#out-back').show(); }, function() { $('#out-back').hide(); });
$('#out-trigger').click( function() { window.location.href = 'https://rtz.tsadra.org/index.php/RTZ_Outline'; })