< User:GoldenRing
Browse history interactively ← Previous edit Content deleted Content addedInline
Latest revision as of 16:03, 26 September 2020
// <pre> <nowiki>
(function() {
$(document).ready(function() {
var div = $("<div></div>");
div.css({
display: 'none',
border: 'solid thin black',
position: 'absolute',
'background-color': '#ffffff',
'z-index': '10',
padding: '0.3em'
});
div.attr('id', 'gr-userlinks-hover');
$('body').append(div);
var hidetimer = null;
var hidebox = function() {
$('#gr-userlinks-hover').css('display', 'none');
hidetimer = null;
}
var wikilink = function(l, t) {
return '<a href="' + mw.config.get('wgServer') + '/' + l + '">' + t + '</a>';
}
$("a.userlink, a.mw-userlink").hover(
function() {
if (hidetimer != null) {
window.clearTimeout(hidetimer);
}
var title = $(this).attr('title');
var username = title.split(':');
var dne = ' (page does not exist)';
if( username.endsWith(dne) )
username = username.substring(0, username.indexOf(dne));
if( username.indexOf(";") > 0 )
username = username.substring(0, username.indexOf(";"));
console.log(username);
$('#gr-userlinks-hover')
.html(wikilink('User talk:' + username, 'talk') + ' ' + wikilink('Special:Contributions/' + username, 'contribs') + ' <a href="https://xtools.wmflabs.org/ec/en.wikipedia.org/' + username + '">X!</a> ' + wikilink('Special:Log/' + username, 'log') + ' ' + wikilink('Special:Log/block?page=' + username, 'block log') + ' ' + wikilink('Special:DeletedContributions/' + username, 'deleted contribs'))
.css({
display: 'block',
top: $(this).offset().top + $(this).height() + 3,
left: $(this).offset().left
});
},
function() {
hidetimer = window.setTimeout(hidebox, 250);
}
);
$("#gr-userlinks-hover").hover(
function() {
if (hidetimer != null) window.clearTimeout(hidetimer);
},
function() {
hidetimer = window.setTimeout(hidebox, 250);
}
);
});
} ());
// </nowiki> </pre>
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.
**DISCLAIMER** We are not affiliated with Wikipedia, and Cloudflare.
The information presented on this site is for general informational purposes only and does not constitute medical advice.
You should always have a personal consultation with a healthcare professional before making changes to your diet, medication, or exercise routine.
AI helps with the correspondence in our chat.
We participate in an affiliate program. If you buy something through a link, we may earn a commission 💕
↑