Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Mangalator Mouse Pop-up
- // @author Suwako
- // @description Makes the second translation box pop-up near the mouse instead
- // @include http://mangalator.ch/show.php*
- // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
- // @version 1.0
- // ==/UserScript==
- //-----------------------------------------------------------
- this.$ = this.jQuery = jQuery.noConflict(true); // Avoid duplicate jQuery conflict
- //-----------------------------------------------------------
- $(function() {
- //-----------------------------------------------------------
- var mouseX; var mouseY;
- $(document).mousemove(function(e) {
- mouseX = e.pageX - 80;
- mouseY = e.pageY + 80; });
- $('.secondTranslationBox').hide();
- $('.secondTranslationBox').css({'z-index':500});
- $('.window').mouseover(function() {
- $('.secondTranslationBox').css({'top':mouseY,'left':mouseX}).fadeIn('fast'); });
- $('.window').mouseout(function() {
- $('.secondTranslationBox').fadeOut('fast'); });
- //-----------------------------------------------------------
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement