🏳️‍🌈Happy pride month to all ppl.🏳️‍⚧️ --Screamer1234 (talk) 17:03, 31 May 2024 (MST)

Permanently protected page

MediaWiki:Common.js: Difference between revisions

From Screamer Wiki
Jump to: navigation, search
No edit summary
No edit summary
 
(214 intermediate revisions by 6 users not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
$("#iframeloader-GoodIntentions").replaceWith('<iframe src=https://www.bitchute.com/embed/UNBNbGMM1B1q/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-ABabyToy").replaceWith('<iframe src=https://www.bitchute.com/embed/7ONLxUCacy4c/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-JingleBellsReversed").replaceWith('<iframe src=https://www.bitchute.com/embed/gyxTQDvlDDay/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-ChrisTheJackOLantern").replaceWith('<iframe src=https://www.bitchute.com/embed/BzK2JS21Ng5l/ WIDTH=480 HEIGHT=360>');
$("#Attributions").replaceWith('<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.');


$("#Blue").replaceWith('<iframe width="1" height="1" src="https://www.youtube.com/embed/XgztfRBc2jM?autoplay=1&loop=1&playlist=XgztfRBc2jM"; frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-Discord").replaceWith('<iframe src="https://discord.com/widget?id=566164881762418695&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>');


/* YouTube Embed /*
//Poll Test
$ ("#iframeloader-KfeeBehindScenes").replaceWith('<iframe width="480" height="360" src="https://www.youtube.com/embed/lnnxURHT2Ak" frameborder="0" allow="encrypted-media; picture-in-picture" allowfullscreen></iframe>')
$("#PollTest").replaceWith('<iframe src="https://polls.screamer.wiki/polls.php?id=45&embed=1&estyle=DefaultLight" width="500" max-width="500" height="400" max-height="600">');
$("#PollTest2").replaceWith('<iframe src="https://polls.screamer.wiki/polls.php?id=49&embed=1&estyle=DefaultDark" width=500" max-width="500" height="500" max-height="800" style="border: none">');


/* Replaces {{Username}} with the name of the user browsing the page.
  Requires copying Template:Username. */


    $wgGroupPermissions['annoymous']['createpage'] = false;
    $wgGroupPermissions['annoymous']['edit'] = false;




/* BitChute Player (adapted from YouTube player .js) */
/*  
mw.hook('wikipage.content').add(function($content) {
* Script Name: InputUsername
     $content.find('.bitchuteplayer:not(.loaded)').each(function() {
* Author: Ihojose
         var $this = $(this),
*
            data = $this.data(),
* Adds the username of the user viewing the page.
             uri = new mw.Uri('https://www.bitchute.com/embed/'),
* Only works for logged in users.
             id = String(data.id || '').trim();
*
* Added by Spottra 5-Apr-2015:
        if (id === '') {
* Individual users can define "window.disableUsernameReplace = true;" in their
            console.warn('[BitChute Player] Video ID is not defined.');
* global.js or local common.js file to disable the replacement for themselves if
            return;
* they so desire.
        }
*/
 
        uri.path += id;
/* global $, mw */
;(function (window, $, mw) {
        $this.html(
     'use strict';
            $('<iframe>', {
    var username = mw.config.get('wgUserName');
                width: String(data.width || '').trim(),
    if (
                height: String(data.height || '').trim(),
        window.disableUsernameReplace ||
                src: uri.toString(),
        !username
            })
    ) {
         ).addClass('loaded');
         return;
     });
    }
});
    window.disableUsernameReplace = true;
    var $rail = $('#WikiaRail'),
        customSelector = window.UsernameReplaceSelector
             ? ', ' + window.UsernameReplaceSelector
             : '';
    function inputUsername($content) {
        $content.find('.InputUsername, .insertusername' + customSelector).text(username);
    }
    mw.hook('wikipage.content').add(inputUsername);
    if ($rail.hasClass('loaded')) {
        inputUsername($rail);
    } else if ($rail.length) {
         $rail.on('afterLoad.rail',
            $.proxy(inputUsername, null, $rail)
        );
     }
})(window, jQuery, mediaWiki);

Latest revision as of 15:32, 6 December 2023

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

$("#Blue").replaceWith('<iframe width="1" height="1" src="https://www.youtube.com/embed/XgztfRBc2jM?autoplay=1&loop=1&playlist=XgztfRBc2jM"; frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-Discord").replaceWith('<iframe src="https://discord.com/widget?id=566164881762418695&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>');

//Poll Test
$("#PollTest").replaceWith('<iframe src="https://polls.screamer.wiki/polls.php?id=45&embed=1&estyle=DefaultLight" width="500" max-width="500" height="400" max-height="600">');
$("#PollTest2").replaceWith('<iframe src="https://polls.screamer.wiki/polls.php?id=49&embed=1&estyle=DefaultDark" width=500" max-width="500" height="500" max-height="800" style="border: none">');

/* Replaces {{Username}} with the name of the user browsing the page.
   Requires copying Template:Username. */

    $wgGroupPermissions['annoymous']['createpage'] = false;
    $wgGroupPermissions['annoymous']['edit'] = false;


/* 
 * Script Name: InputUsername
 * Author: Ihojose
 *
 * Adds the username of the user viewing the page.
 * Only works for logged in users.
 *
 * Added by Spottra 5-Apr-2015:
 * Individual users can define "window.disableUsernameReplace = true;" in their
 * global.js or local common.js file to disable the replacement for themselves if
 * they so desire.
 */

/* global $, mw */
;(function (window, $, mw) {
    'use strict';
    var username = mw.config.get('wgUserName');
    if (
        window.disableUsernameReplace ||
        !username
    ) {
        return;
    }
    window.disableUsernameReplace = true;
    var $rail = $('#WikiaRail'),
        customSelector = window.UsernameReplaceSelector
            ? ', ' + window.UsernameReplaceSelector
            : '';
    function inputUsername($content) {
        $content.find('.InputUsername, .insertusername' + customSelector).text(username);
    }
    mw.hook('wikipage.content').add(inputUsername);
    if ($rail.hasClass('loaded')) {
        inputUsername($rail);
    } else if ($rail.length) {
        $rail.on('afterLoad.rail',
            $.proxy(inputUsername, null, $rail)
        );
    }
})(window, jQuery, mediaWiki);