(returning to last version before corey's first one, then retrofitting new code present in the version immediately previous to this one) |
(replacing entire contents with JUST the site notice) |
||
Line 1: | Line 1: | ||
− | /* <pre><nowiki> */ |
||
− | |||
− | var SocialMediaButtons = { |
||
− | position: "top", |
||
− | colorScheme: "color" |
||
− | }; |
||
− | cacheSkip = []; |
||
− | cacheSkipLimit = 5000; |
||
− | importArticles({ |
||
− | type: "script", |
||
− | articles: [ |
||
− | "MediaWiki:Common.js/displayTimer.js", |
||
− | "w:c:dev:ListAdmins/code.js", |
||
− | 'u:dev:ListAdmins/code.js', |
||
− | 'u:dev:UserTags/code.js', |
||
− | 'u:dev:MiniComplete/code.js', |
||
− | 'u:dev:SocialIcons/code.js', |
||
− | 'u:dev:CacheCheck/code.js' |
||
− | ], |
||
− | }); |
||
− | |||
//Sitenotice: the notion of prepending to $WikiaArticle came from [[User:Cåm]] |
//Sitenotice: the notion of prepending to $WikiaArticle came from [[User:Cåm]] |
||
Line 25: | Line 4: | ||
$('#WikiaArticle').prepend('<div style="color:#012c57;font-family:Raleway;padding:10px;background-image: -ms-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -moz-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -o-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #8BADCE), color-stop(1, #8BBBDF)); background-image: -webkit-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: linear-gradient(to right, #8BADCE 0%, #8BBBDF 100%);text-align:center;margin-left:auto;margin-right:auto;margin-bottom:20px;"><a href="http://tardis.wikia.com/wiki/Tardis_Trivia_Quizzes" style=color:whitesmoke;background:none;font-weight:600>Take our 50th anniversary quizzes.</a> <span style=font-weight:600>If you don\'t mind begging for mercy.</span></div>'); |
$('#WikiaArticle').prepend('<div style="color:#012c57;font-family:Raleway;padding:10px;background-image: -ms-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -moz-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -o-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #8BADCE), color-stop(1, #8BBBDF)); background-image: -webkit-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: linear-gradient(to right, #8BADCE 0%, #8BBBDF 100%);text-align:center;margin-left:auto;margin-right:auto;margin-bottom:20px;"><a href="http://tardis.wikia.com/wiki/Tardis_Trivia_Quizzes" style=color:whitesmoke;background:none;font-weight:600>Take our 50th anniversary quizzes.</a> <span style=font-weight:600>If you don\'t mind begging for mercy.</span></div>'); |
||
− | |||
− | |||
− | // Welcome notification message |
||
− | // from sourcepedia.wikia.com |
||
− | // removed for preload testing |
||
− | |||
− | /* ========================= |
||
− | Custom preload templates |
||
− | for the new (2011) Wikia editor |
||
− | Version 0.2 23.12.11 |
||
− | with slight cosmetic changes |
||
− | from original |
||
− | ========================= |
||
− | Written by [[starwars:user:Grunny]] |
||
− | First published at: |
||
− | [[starwars:MediaWiki:Wikia.js]] |
||
− | ========================= |
||
− | Requires additional code at |
||
− | Common.js |
||
− | ========================= */ |
||
− | |||
− | function customPreloadTemplates() { |
||
− | |||
− | if( wgAction !== 'edit' || !$( 'div.module_content' ).length ) { |
||
− | return; |
||
− | } |
||
− | |||
− | var preloadOptionsHtml = '', |
||
− | $preloadOptionsList, |
||
− | preloadBaseHtml = '<div id="lf-preload" style="display: block; padding: 10px;">Standard preloads:<br /></div>' + |
||
− | '<div style="padding: 10px;">Custom preload pagename:<br /><span id="lf-preload-pagename-w"></span><span id="lf-preload-button-w"></span></div>'; |
||
− | |||
− | $( 'div.module_content:first' ).append( preloadBaseHtml ); |
||
− | |||
− | $.get( wgScript, { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' }, function( data ) { |
||
− | var lines = data.split( '\n' ); |
||
− | for( var i = 0; i < lines.length; i++ ) { |
||
− | var value = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : ""; |
||
− | preloadOptionsHtml += '<option value="' + value + '">' + lines[i] + '</option>'; |
||
− | } |
||
− | $preloadOptionsList = $( '<select />' ).attr( 'id', 'stdSummaries' ).html( preloadOptionsHtml ).change( function() { |
||
− | var value = $( this ).val(); |
||
− | if ( value !== '' ) { |
||
− | value = 'Template:' + value + '/preload'; |
||
− | value = value.replace( ' ', '_' ); |
||
− | $.get( wgScript, { title: value, action: 'raw', ctype: 'text/plain' }, function( data ) { |
||
− | insertAtCursor( document.getElementById( 'wpTextbox1' ), data ); |
||
− | } ); |
||
− | } |
||
− | } ); |
||
− | |||
− | $( 'div#lf-preload' ).append( $preloadOptionsList ); |
||
− | } ); |
||
− | |||
− | $( '#lf-preload-pagename-w' ).html( '<input type="text" class="textbox" />' ); |
||
− | $( '#lf-preload-button-w' ).html( '<input type="button" class="button" value="Insert" onclick="doCustomPreloadOasis()" />' ); |
||
− | |||
− | } |
||
− | $( customPreloadTemplates ); |
||
− | |||
− | function doCustomPreloadOasis() { |
||
− | var value = $( '#lf-preload-pagename-w > input' ).val(); |
||
− | value = value.replace( ' ', '_' ); |
||
− | $.get( wgScript, { title: value, action: 'raw', ctype: 'text/plain' }, function( data ) { |
||
− | insertAtCursor( document.getElementById( 'wpTextbox1' ), data ); |
||
− | } ); |
||
− | } |
||
− | |||
− | //Getting rid of comment button |
||
− | // This is on at tardis, but the styling here makes this work less well at this wiki |
||
− | |||
− | $('a[data-id="comment"]').removeClass('comments'); |
||
− | |||
− | importArticles({ |
||
− | type: "script", |
||
− | articles: [ |
||
− | "MediaWiki:Common.js/displayTimer.js", |
||
− | "w:c:dev:ListAdmins/code.js", |
||
− | /*"w:c:dev:UserBadges/code.js"*/ |
||
− | ], |
||
− | }); |
||
− | |||
− | |||
− | |||
− | /*</nowiki></pre>*/ |
Revision as of 21:45, 21 February 2014
//Sitenotice: the notion of prepending to $WikiaArticle came from [[User:Cåm]]
//$('#WikiaArticle').prepend('<div style="border:2px solid black;background-color:ghostwhite;border-radius:5px;padding:10px;width:100%">This wiki is having a bit of a facelift. Please bear with us as we try to get it finished.</div>');
$('#WikiaArticle').prepend('<div style="color:#012c57;font-family:Raleway;padding:10px;background-image: -ms-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -moz-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -o-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #8BADCE), color-stop(1, #8BBBDF)); background-image: -webkit-linear-gradient(left, #8BADCE 0%, #8BBBDF 100%); background-image: linear-gradient(to right, #8BADCE 0%, #8BBBDF 100%);text-align:center;margin-left:auto;margin-right:auto;margin-bottom:20px;"><a href="http://tardis.wikia.com/wiki/Tardis_Trivia_Quizzes" style=color:whitesmoke;background:none;font-weight:600>Take our 50th anniversary quizzes.</a> <span style=font-weight:600>If you don\'t mind begging for mercy.</span></div>');