User:ArsenalBastion4093/global.js

// [Code Name="Return To Community Central Button"] if (location.host != "community.fandom.com") { $(".fandom-community-header__community-name-wrapper").append(" [↰ Return To Community Central]") } // [/Code] // [Code Name="Tools In Links"] $(".page a[href^='/wiki/']:not([href^='/wiki/Special:']):not(.image.lightbox):not([href^='/wiki/Message_Wall:']):not([href*='?']:not([href$='?redirect=no']))").queue(function{	$(this).append(` [ {		var as = this.href.split("/wiki/")		as.shift		as = as[0].split("?").length>1?as.join("/wiki/").split("?"):as.join("/wiki/").split("#")		return as[0] 	})}?action=history">hist |  {		var as = this.href.split("/wiki/")		as.shift		as = as[0].split("?").length>1?as.join("/wiki/").split("?"):as.join("/wiki/").split("#")		return as[0] 	})}?action=edit">edit] `) }) var sty = document.createElement("style") sty.innerHTML="a .tools{display:none} a:hover .tools{display:inline-block}" document.body.appendChild(sty) // [/Code] // [Code Name="UserContribution+RecentChanges+PageRevision Change"] $(".mw-contributions-list li").queue(function{	$(this).find(".mw-changeslist-links").append(` edit `) }) $("#pagehistory li:first-child").append("&lrm; ").find(".mw-changeslist-links:not(.mw-history-histlinks):not(.mw-usertoollinks)").append(` edit `).appendTo("#pagehistory li:first-child") $("#pagehistory li:not(:first-child):not(:last-child)").queue(function{	$(this).append("&lrm; ")	$(this).find(".mw-changeslist-links:not(.mw-history-histlinks):not(.mw-usertoollinks)").html(` edit `).appendTo($(this)) }) $("#pagehistory li:last-child").queue(function{	$(this).append(`&lrm; edit  `) }) $(".mw-special-Contributions .mw-contributions-user-tools .mw-changeslist-links").append(` see him/her at another wiki</a> personal CSS</a>  personal JS</a> `) $("#see-at-another-wiki").click(function{	var code = prompt("Insert Wiki Name Code!","community"),	language = prompt("Insert Wiki Language Code!","en")	open(`http://${code==null||code==""?"community":code}.fandom.com${language=="en"||language==null||language==""?"":"/"+language}/wiki/Special:Contributions/${$("h1[itemprop=name]").text}`,"_self") }) // [/Code] // [Code Name="ImportJS"] $(".page-MediaWiki_ImportJS pre").html("" + $(".page-MediaWiki_ImportJS pre").text.split("\n").join("</a> ") + "</a>") $(".page-MediaWiki_ImportJS pre a").queue(function{	if ($(this).text.split(":").length>1){		$(this).attr("href",`http://${$(this).text.split(":")[0]}.fandom.com/wiki/MediaWiki:${$(this).text.split(":")[1]}`)	} else {		$(this).attr("href",`/wiki/MediaWiki:${$(this).text}`)	} }) $(".page-MediaWiki_ImportCSS pre").html("" + $(".page-MediaWiki_ImportCSS pre").text.split("\n").join("</a> ") + "</a>") $(".page-MediaWiki_ImportCSS pre a").queue(function{	if ($(this).text.split(":").length>1){		$(this).attr("href",`http://${$(this).text.split(":")[0]}.fandom.com/wiki/MediaWiki:${$(this).text.split(":")[1]}`)	} else {		$(this).attr("href",`/wiki/MediaWiki:${$(this).text}`)	} }) // [/Code] // [Code Name="Replacement In Fan Feed"] Object.defineProperties(Array.prototype,{	random_item: {		get{			return this[Math.floor(this.length*Math.random)]		},		set{			throw TypeError("youtu.be/dQw4w9WgXcQ")		}	} }) var Contents = [ {img: "https://i.imgur.com/poCtNRk.gif", link: "//youtu.be/dQw4w9WgXcQ", title: "Rick Astley - Never Gonna Give You Up (Official Music Video)", subtitle: "YouTube"}, {img: "https://i.ytimg.com/vi/ErSmRD67pzo/hqdefault.jpg", link: "https://www.youtube.com/watch?v=ErSmRD67pzo", title: "Discord in 2045", subtitle: "Beluga YouTube"}, {img: "https://i.ytimg.com/vi/caFAItMHPhE/hqdefault.jpg", link: "https://www.youtube.com/watch?v=caFAItMHPhE", title: "Discord in 420 BC", subtitle: "Beluga YouTube"}, {img: "https://i.ytimg.com/vi/aZqA8h2TA-I/hqdefault.jpg", link: "https://www.youtube.com/watch?v=aZqA8h2TA-I", title: "When Your Instagram Gets Hacked", subtitle: "Beluga YouTube"}, {img: "https://i.ytimg.com/vi/ZqhEFk-zdEU/hqdefault.jpg", link: "https://www.youtube.com/watch?v=ZqhEFk-zdEU", title: "If Elon Musk owned Discord...", subtitle: "Beluga YouTube"}, {img: "https://i.ytimg.com/vi/JLSqhWue9BU/hqdefault.jpg", link: "https://www.youtube.com/watch?v=JLSqhWue9BU", title: "When a Discord Mod gets hacked...", subtitle: "Beluga YouTube"}, {img: "https://yt3.ggpht.com/ytc/AMLnZu_iIS6ZdSR284j0d23PTr7Hrd_S6pA6oaO9uVSAAw=s88-c-k-c0x00ffffff-no-rj", link: "https://www.youtube.com/c/Thatonefigoh/videos", title: "Thatonefigoh", subtitle: "YouTube"}, {img: "https://yt3.ggpht.com/A0J6Rt1YweNdTa3j9gEdrfjxlQrowJ-3H5oLrYY96T6jJI5vhI0FKeIG3hRL2sPMztKiRFXh9w=s88-c-k-c0x00ffffff-no-rj", link: "https://www.youtube.com/c/FlashinRahul/videos", title: "Flash in Rahul", subtitle: "YouTube"} ] function b { $(".mcf-card-article__link").queue(function{		if ($(this).find("a").attr("href").split("sml.fandom.com").length>1) {			var item = Contents.random_item			$(this).find("a").css("background-image",`linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000), url("${item.img}")`).attr("href",item.link).attr("title",item.title).html(`<span class='mcf-card-article__title'>${item.title} <span class='mcf-card-article__subtitle'>${item.subtitle} `)		}	}) setTimeout(b,100) } b // [/Code] importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MarkBlocked.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:InactiveUsers/code.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:UserAccountAge/code2.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:UserBlockNotification.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:SeeMoreActivityButton/code.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:BlockSummary.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:RelatedDiscussionsPosts.js',    ] }); /* Unused Codes: function a{ var ab = document.querySelectorAll(".user-identity-header__tag") if (ab.length==0) { setTimeout(a,100) } else if ((ab.length==1) && (ab[0].innerHTML=="Blocked")) { ab[0].innerHTML="Grounded" } } a $(".wikia-gallery-item, .category-page__trending-page, .category-page__member, .category-page__first-char, #pagehistory li").queue(function{ 	$(this).css("animation","2s "+["backInDown","backInUp","backInLeft","backInRight","bounceInDown","bounceInUp","bounceInLeft","bounceInRight","jackInTheBox",'fadeIn', 'fadeInDown', 'fadeInDownBig', 'fadeInLeft', 'fadeInLeftBig', 'fadeInRight', 'fadeInRightBig', 'fadeInUp', 'fadeInUpBig', 'fadeInTopLeft', 'fadeInTopRight', 'fadeInBottomRight', 'fadeInBottomLeft','flipInX', 'flipInY', 'lightSpeedInRight', 'lightSpeedInLeft', 'rotateIn', 'rotateInDownLeft', 'rotateInDownRight', 'rotateInUpLeft', 'rotateInUpRight', 'rollIn', 'zoomIn', 'zoomInDown', 'zoomInLeft', 'zoomInRight', 'zoomInUp', 'slideInDown', 'slideInLeft', 'slideInRight', 'slideInUp'].random_item)	setTimeout(=>{ $(this).css("animation-duration","") },2000) }) $(".wikia-gallery-item, .category-page__trending-page, .category-page__member, .category-page__first-char, #pagehistory li").mouseover(function{ 	$(this).css("animation","1s " + ['bounce', 'flash', 'pulse', 'rubberBand', 'shakeX', 'shakeY', 'headShake', 'swing', 'tada', 'wobble', 'jello', 'heartBeat'].random_item) }) setTimeout(=>{	$(".rail-module__list a, #mw-content-text a").on("mousedown",function{ $(this).html(" " + $(this).text.split("").join(" ").split(" \n ").join(" ") + " ") $(this).find(".char").queue(function{			$(this).css("position","relative")			var radx = Math.random*1-0.5			var rady = Math.random*1-0.5			var ccc = => {				$(this).css({left:radx+"px", top:rady+"px"});				radx+=Math.random*1-0.5				rady+=Math.random*1-0.5				setTimeout(ccc,10)			}			ccc		}); }) },500)