-
-
Save Phr33d0m/4fb2bf35f5885fd6f49879a442d4bb41 to your computer and use it in GitHub Desktop.
Fix adding styles
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
const stylez = `<style> | |
.masinfo {z-index: 1 !important} | |
.masinfo span {display: inline-block !important} | |
.masinfo .ficha div {line-height: 12px !important} | |
.masinfo .ficha .rapido {background-size: 100%; top: 2px; width: 10px; height: 10px;} | |
</style>`; | |
document.head.insertAdjacentHTML("beforeend", stylez) | |
var jqCjs = jQuery.noConflict(); | |
jqCjs('.ttitle').hover(function() { | |
var ttitle = jqCjs(this); | |
var link = ttitle.children('a').length === 2 | |
? ttitle.children('a')[1].href | |
: ttitle.children('a')[0].href; | |
// If there's no masinfo element, add it | |
if (!ttitle.find('.masinfo').length) { | |
ttitle.append('<span class="masinfo"></span>'); | |
} | |
var masinfo = jqCjs(ttitle.find('.masinfo')[0]); | |
// If there's no file loaded yet, load it | |
if (!masinfo.find('.ficha')[0]) { | |
masinfo.text('Cargando...'); | |
masinfo.load(link + ' .ficha'); | |
} | |
}, function() {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment