// ==UserScript== // @name [Katcr.co] Old Header // @namespace pxgamer // @version 0.6.1 // @description Updates the header to be like the old one. // @author pxgamer // @include *katcr.co/community/* // @require https://code.jquery.com/jquery-3.1.0.min.js // @grant GM_getValue // @grant GM_setValue // @downloadURL none // ==/UserScript== /*jshint multistr: true */ (function() { 'use strict'; let settings = { stickyHeader: true }; let menu = { avatar: $('#upper_section .user .avatar img.avatar').attr('src'), bar: $('#main_menu').html(), sticky: '', mCount: $('#button_pm a span strong').text() }; let links = { profile: 'https://katcr.co/community/index.php?action=profile', settings: 'https://katcr.co/community/index.php?action=profile;area=account', forumset: 'https://katcr.co/community/index.php?action=profile;area=forumprofile', logo: 'https://pximg.xyz/images/d2c1586c07034bc321ffb696f9929b47.png', logout: $('#button_logout a').attr('href'), replies: 'https://katcr.co/community/index.php?action=unreadreplies' }; $('#header').html(''); if (settings.stickyHeader){ menu.sticky = 'position: fixed;'; } $('#wrapper').before('
'+menu.bar+'
'); $('#button_home').remove(); $('#new_nav').prepend(''); $('#button_profile').remove(); $('#button_logout').remove(); let calHtml = $('#button_calendar'); $('#button_calendar').remove(); $('#button_mlist').after(calHtml); $('#menu_nav').css('padding', '0'); $('#button_pm ul li:first a').html('Dialogs'); $('#button_pm ul li:last a').html('Create new'); $('#menu_nav').append('