Permanently protected page

MediaWiki:Common.js: Difference between revisions

From Screamer Wiki
Jump to: navigation, search
No edit summary
No edit summary
 
(143 intermediate revisions by 4 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>');
$("#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-ABabyToy").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/04dbcd3a-4ac5-4d01-9487-0129915d8411" frameborder="0" allowfullscreen></iframe>');
$("#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>');
$("#iframeloader-ChrisTheJackOLantern2").replaceWith('<iframe src=https://www.bitchute.com/embed/gK7fMHZ1socY/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-UltimateMaze").replaceWith('<iframe src=https://www.bitchute.com/embed/mJ6UtllaD6qf/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-DolphinSwim").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/2ba97ac8-befc-46e5-b6da-5d6dc6b2fbd8" frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-ReverseSongPrank").replaceWith('<iframe src=https://www.bitchute.com/video/ofkuHcKaW886/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-Find5ThingsWrong").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/6bcb5592-8d16-4291-a424-a7f0cb1c062f" frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-Danceswf").replaceWith('<iframe width="640" height="360" scrolling="no" frameborder="0" style="border: none;" src="https://www.bitchute.com/embed/a5lCBw302JyO/"></iframe>');
$("#iframeloader-HeartFace").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/45e6d6ea-72e6-4767-855e-dd68e91fe346" frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-CountingSheep").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/464f0dad-e118-4ba3-9bc5-f07029832119" frameborder="0" allowfullscreen></iframe>');
$("#BlackMazeGame").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/ff465dea-16c7-4247-8a2e-04f2f701a3e4" frameborder="0" allowfullscreen></iframe>');
$("#Frau1").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/c02afea4-8bcf-46f8-9aef-0990e5070c7f" frameborder="0" allowfullscreen></iframe>');
$("#TMSF").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/5398819d-2c32-4194-8608-284e5be4168d" frameborder="0" allowfullscreen></iframe>');
$("#SnowmanSnowglobe").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/6ef5b6dc-35cb-4843-b240-8fb4bea95275" frameborder="0" allowfullscreen></iframe>');
$("#Poobutton").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e84f550c-abb1-467e-a0b4-fbf5e4865d90" frameborder="0" allowfullscreen></iframe>');
$("#Offended").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e263feca-5e93-4261-98be-a96f0665004e" frameborder="0" allowfullscreen></iframe>');
$("#MazeGame10").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/3df32ab1-1681-41e1-9acd-73f2e8090f0f" frameborder="0" allowfullscreen></iframe>');
$("#SomebodyLovesYou").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e4a811f5-4597-4f8c-a64f-4ed0c79f7b2b" frameborder="0" allowfullscreen></iframe>');
$("#TinyDotMaze").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e6f51c39-1450-400b-ab4a-cc267dec1665" frameborder="0" allowfullscreen></iframe>');
$("#SteadyHand").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/72f1f676-9c47-4f7d-9664-536f7fbf6a76" frameborder="0" allowfullscreen></iframe>');
$("#Tortazo").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/20cd8d45-82df-4d4b-80e1-d9863b51760a" frameborder="0" allowfullscreen></iframe>');
$("#OnlineHunting").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/1e03cb09-54d6-42f8-8f1f-399d03cdd150" frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-MazeGame6").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/bfa49354-8c04-42e5-a3c6-8613e8386339" frameborder="0" allowfullscreen></iframe>');
$("#iframeloader-ScaryMazeIO").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/1e5b5810-3bc2-4e4e-b1ed-0343c310335f" frameborder="0" allowfullscreen></iframe>');
$("iframeloader-MonkeySugar").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e95a9659-e994-4fdc-814c-ef2dc9b5dfaf" frameborder="0" allowfullscreen></iframe>');
$("#IHATEYOU").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/777d2068-3cae-42f9-9da7-cf1edc61685b" frameborder="0" allowfullscreen></iframe>');
$("#RaveMusik").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/0481c403-a536-4451-a74c-6460163e8aa7" frameborder="0" allowfullscreen></iframe>');
$("#Scary.exe").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/0030cd8d-1cf9-48ad-aa7f-4b4d24ecfa84" frameborder="0" allowfullscreen></iframe>');
$("#ScaryYahoo").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/36aac75f-d7ff-45b2-bd2e-9475683dd266" frameborder="0" allowfullscreen></iframe>');
$("#MonkeySugar1").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/e95a9659-e994-4fdc-814c-ef2dc9b5dfaf" frameborder="0" allowfullscreen></iframe>');
$("#IHATEYOU").replaceWith('<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.screamer.wiki/videos/embed/92d6538f-5dbd-4c7f-8cd5-f9084273e7ee" 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>');
$("#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.
/* Replaces {{Username}} with the name of the user browsing the page.
Line 41: Line 12:


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


   
 
function UserNameReplace() {
/*
     if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
* Script Name: InputUsername
     $("span.insertusername").html(wgUserName);
* Author: Ihojose
}
*
addOnloadHook(UserNameReplace);
* Adds the username of the user viewing the page.
* Only works for logged in users.
importArticles({
  *
    type: 'script',
* Added by Spottra 5-Apr-2015:
    articles: [
* Individual users can define "window.disableUsernameReplace = true;" in their
         'u:dev:MediaWiki:YoutubePlayer/code.js'
* 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);

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);