Created
February 22, 2017 11:57
-
-
Save stijnherreman/8c4ba734acf15393d73c408c79831dfc to your computer and use it in GitHub Desktop.
Based on the Chrome extension of Travis J at http://meta.stackoverflow.com/a/344231/247702
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name StackTopReorder | |
// @description A top bar in a different order. | |
// @namespace TravisJ | |
// @author TravisJ | |
// @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html) | |
// @include http://meta.stackoverflow.com/* | |
// @include http://stackoverflow.com/* | |
// @include *.stackexchange.com/* | |
// @grant GM_addStyle | |
//jQuery injection | |
function $$(f) { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.textContent = "(" + f.toString() + ")(jQuery)"; | |
document.body.appendChild(script).parentNode.removeChild(script); | |
}; | |
//reorder the new topbar | |
$$(function($){ | |
var logoLinks = $('.-main'); | |
var logo = $('a.-logo._glyph',logoLinks); | |
logo.css('width','25px'); | |
$('span',logo).css('width','25px'); | |
var url = $('span',logo).css('background-image'); | |
logoLinks.parent().append(logoLinks); | |
var name = $('div.-actions a.my-profile.js-gps-track'); | |
name.parent().append(name); | |
name.css('margin-right','35px'); | |
var actions = $('div.-actions ol.-list'); | |
actions.append(actions.children('li.-item').get().reverse()); | |
}); | |
GM_addStyle(".topbar-dialog.dno { right:initial !important; }"); | |
GM_addStyle(".so-header .-actions { margin-left: 0 !important; }") | |
// ==/UserScript== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment