try to take over the world!
当前为
// ==UserScript==
// @name hover for link
// @namespace https://github.com/Khdoop
// @version 0.1
// @description try to take over the world!
// @author Khdoop
// @match *://*/*
// @grant none
// @require https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
var body = $(document.body);
console.log('1111111', body);
var anchors = body.find('a');
var box = $('<div class="link-tooltip"></div>').appendTo(body);
box.css({
display: 'block',
position: 'absolute',
left: 0,
padding: '5px',
'font-size': '18px',
background: 'white',
border: '1px solid black',
opacity: 0.8,
'word-break': 'break-all'
});
anchors.on('mouseover', function() {
box.css({display: 'block', top: body.scrollTop()}).text($(this)[0].href);
}).on('mouseleave', function() {
box.css({display: 'none'});
});