Skyforge Wikia - Bubble help on skill (Abilities and Talents)

Add a bubble help when you mouseover a skill name (Abilities and Talents)

当前为 2015-08-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Skyforge Wikia - Bubble help on skill (Abilities and Talents)
  3. // @namespace hideonScript
  4. // @author Tegomass
  5. // @description Add a bubble help when you mouseover a skill name (Abilities and Talents)
  6. // @include http://skyforge.wikia.com/*
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
  8. // @version 1.0
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11.  
  12. GM_addStyle('#WikiaArticle{overflow: visible !important;}\
  13. .tego_box{display:none;}\
  14. a[title]:hover .tego_box{ display:inline; position:absolute; z-index: 9999}');
  15.  
  16. $(function() { //shortcut link
  17. if (!$('table.lighttable.zebra').length) {
  18. return false;
  19. }
  20. $('table.lighttable.zebra').each(function(index, el) {
  21. $('a[title]', this).one('mouseover', function(e) {
  22. get_skill_info($(this).attr('href'), $(this));
  23. });
  24. });
  25.  
  26. function get_skill_info(url, self) {
  27. $.get(url, function(data) {
  28. var item = $('aside.portable-infobox', data);
  29. item.addClass('tego_box');
  30. self.append(item);
  31. });
  32. }
  33. });