Widget:HoverCard: Difference between revisions

From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Pillowkeeper
No edit summary
imported>Pillowkeeper
mNo edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<a href="http://live.urealms.com/cards#<!--{$id|escape:'urlpathinfo'}-->">
 
<!--{$name|escape:'html'}--></a>
<script>
<div class="box">
    window.addEventListener("load", function () {
<iframe src="http://live.urealms.com/cards#<!--{$id|escape:'urlpathinfo'}-->" scrolling="no" width="600" height="500" style="position:relative; top:-495px; bottom:-25px;  left:100px; overflow: hidden;">
      var quotes = [
</iframe>
        {
</div>
          text: "text1",
        },
        {
          text: "text2",
        },
        {
          text: "text3",
        },
        {
          text: "text4",
        },
        {
          text: "text5",
        }
      ];
      var quote = quotes[Math.floor(Math.random() * quotes.length)];
      document.getElementById("text").innerHTML =
        '<p>' + quote.text + '</p>';
    })();
  </script>
<div id="text"></div>

Latest revision as of 01:59, 14 December 2016

<script>
   window.addEventListener("load", function () { 
     var quotes = [
       {
         text: "text1",
       },
       {
         text: "text2",
       },
       {
         text: "text3",
       },
       {
         text: "text4",
       },
       {
         text: "text5",
       }
     ];
     var quote = quotes[Math.floor(Math.random() * quotes.length)];
     document.getElementById("text").innerHTML =

'

' + quote.text + '

';

   })();
 </script>