// ==UserScript== // @name SE Modifications // @description A collection of modifications for the Stack Exchange network of sites // @match *://stackoverflow.com/* // @match *://meta.stackoverflow.com/* // @match *://superuser.com/* // @match *://meta.superuser.com/* // @match *://serverfault.com/* // @match *://meta.serverfault.com/* // @match *://askubuntu.com/* // @match *://meta.askubuntu.com/* // @match *://*.stackexchange.com/* // @match *://answers.onstartups.com/* // @match *://meta.answers.onstartups.com/* // @match *://stackapps.com/* // @match *://mathoverflow.net/* // @exclude http://chat.stackexchange.com/* // @exclude http://chat.*.stackexchange.com/* // @exclude http://api.*.stackexchange.com/* // @exclude http://data.stackexchange.com/* // @exclude http://*/reputation // @author @rchern // ==/UserScript== function inject() { for (var i = 0; i < arguments.length; ++i) { if (typeof(arguments[i]) == 'function') { var script = document.createElement('script'); script.type = 'text/javascript'; script.textContent = '(' + arguments[i].toString() + ')(jQuery)'; document.body.appendChild(script); } } } inject(function ($) { var profile = $('#hlinks-user a.profile-link'), My = { 'name': profile.text(), 'profile': profile.attr('href') }; $(function () { // Initialize the general stuff here var locationBits = location.hostname.split('.'); if(locationBits[0] !== 'discuss' && (locationBits[0] !== 'meta' || locationBits[1] === 'stackoverflow')) { if (window.profileLink) { var initialized = false; profileLink._show = profileLink.show; profileLink.show = function (u, v) { profileLink._show(u, v); if (!initialized && (initialized = true)) { $('
', {
'text': $(response).filter('pre').text(),
'css': {
'white-space': 'pre-wrap'
}
}).appendTo(this)[0].id = id;
},
'complete': function() {
self.text(original);
}
});
return false;
});
}
/*
* Initializes functionality that only applies to the search results page
* - Removing/untaggifying tags from search results
*/
function initSearchResults() {
var tagpage = false;
if (location.pathname.indexOf('/search') !== 0 &&
!(tagpage = (location.pathname.indexOf('/questions/tagged/') === 0))) {
return;
}
function on() {
$(this).animate({ 'opacity': 1 }, 750);
}
function off() {
$(this).animate({ 'opacity': 0 }, 750);
}
var criteria,
tags = $('#sidebar .tagged a.post-tag');
tags.each(function () {
var tag = $(this),
wrapper = $('')
.append(
$('