User:Atvelonis/global.js

//================================// //====Last Edited - Last Edited shows who edited last on the top of a page====// //================================//

importArticles({ type: 'script', articles: [ // ... 'u:dev:LastEdited/code.js', // ... ] });

/* Removing first half of hideous Fandom logo */

$('svg.wds-global-navigation__logo-image.wds-is-wds-company-logo-fandom').replaceWith('');

/* View Discussions profiles on desktop */

/** $( document ).ready(function {   //Test page for masthead and link to discussions profile and check for double loads    if($('#discussion-bio').length === 0 && $('#UserProfileMasthead #discussionAllPostsByUser').attr('href')) {        var userId = $('#UserProfileMasthead #discussionAllPostsByUser').attr('href').split('/')[3];
 * @author: Flightmare (http://elderscrolls.wikia.com/wiki/User:Flightmare)
 * @version: 1.0
 * @license: CC-BY-SA 3.0
 * @description: Imports the discussions bio (app profile) into the masthead.

//Fetch bio $.ajax({           type: 'GET',            url: 'https://services.wikia.com/user-attribute/user/' + userId + '/attr/bio',            success: function(data) {                //Create new masthead entry                $('.UserProfileMasthead .details').append(' BIO ' + data.value.replace(/(?:\r\n|\r|\n)/g, ' ') + '');

//Add expand toggle button if overflow happens if($('#discussion-bio').prop('scrollHeight') > $('#discussion-bio').outerHeight) { $('#discussion-bio').after(' [Read more] '); $('#discussion-bio-toggle').click(function {                       if($('#discussion-bio').css('max-height') == '100px' ) {                            $('#discussion-bio').css('max-height', 'inherit');                            $('#discussion-bio-toggle').text('[Read less]');                        } else {                            $('#discussion-bio').css('max-height', '100px');                            $('#discussion-bio-toggle').text('[Read more]');                        }                    }); }           }        });    } });

/* Global DiscussionsFeed */

importArticles({   type: 'script',    articles: [        'u:dev:DiscussionsFeed.js',    ] });