daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Dec 17th, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.     $(".AACardLink").tooltip({
  3.         content: function(){
  4.             var cardUrl = $(this).attr("title") + ".png";
  5.             return "<img src=\"http://www.infinite-network.com/images/cards/" + cardUrl + "\" style=\"display:block; border-radius:14px;\">";
  6.         },
  7.         show: {
  8.             effect: "none",
  9.             delay: 0
  10.         },
  11.         hide: {
  12.             effect: "none",
  13.             delay: 0
  14.         }
  15.     });
  16. });
  17.  
  18. $(document).bind('DOMNodeInserted', function(e){
  19.     $this = $(e.target);
  20.     if($this.hasClass("AACardLink")){
  21.         $this.tooltip({
  22.             content: function(){
  23.                 var cardUrl = $(this).attr("title") + ".png";
  24.                 return "<img src=\"http://www.infinite-network.com/images/cards/" + cardUrl + "\" style=\"display:block; border-radius:14px;\">";
  25.             },
  26.             show: {
  27.                 effect: "none",
  28.                 delay: 0
  29.             },
  30.             hide: {
  31.                 effect: "none",
  32.                 delay: 0
  33.             }
  34.         });
  35.     }
  36. });
  37.  
  38.  
  39. /*function forceinsertcardasimg(){
  40.     var x = document.getElementsByClassName("AACardLink");
  41.     var i;
  42.     for (i = 0; i < x.length; i++) {
  43.         var cardname = x[i].href.substr(x[i].href.lastIndexOf('/') + 1);
  44.         cardname = cardname.slice(0, -4);
  45.         x[i].innerHTML = '<img src="http://www.infinite-network.com/images/cards/' + cardname + '.png" border="0" width="235" height="340" />';
  46.         x[i].href = 'http://infinite-network.com/card/' + cardname
  47.         x[i].style.borderBottomStyle = "none"
  48.         x[i].style.borderBottomWidth = "0px"
  49.     }
  50. }*/
  51.  
  52. window.onload = function () {
  53.     var x = document.getElementsByClassName("AACardLink");
  54.     var i;
  55.     for (i = 0; i < x.length; i++) {
  56.         var cardname = x[i].href.substr(x[i].href.lastIndexOf('/') + 1);
  57.         cardname = cardname.slice(0, -4);
  58.         x[i].innerHTML = '<img src="http://www.infinite-network.com/images/cards/' + cardname + '.png" border="0" width="235" height="340" />';
  59.         x[i].href = 'http://infinite-network.com/card/' + cardname
  60.         x[i].style.borderBottomStyle = "none"
  61.         x[i].style.borderBottomWidth = "0px"
  62.     }
  63. }
RAW Paste Data
Top