D_Pain

애니시아AnimeTable Ver:1.0

Jan 6th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Created by D_Pain
  2. // Inorder to use this javascript, add the below at the very end of the your body.
  3. //<script id="animeTableScript" src="http://static.tumblr.com/cnaahls/LIeo0k4rg/animetable.js"></script>
  4.  
  5. /*
  6. // Creating element animeTableCloseButton
  7. var animeTableCloseButton = document.createElement('div');
  8. animeTableCloseButton.id = 'animeTableClose';
  9. animeTableCloseButton.style.position = 'absolute'
  10. animeTableCloseButton.style.zIndex = '1';
  11. animeTableCloseButton.style.backgroundImage = 'url(http://static.tumblr.com/cnaahls/Aa0nz2bd7/bottomrightdockimage_xbutton.png)';
  12. animeTableCloseButton.style.height = '25px';
  13. animeTableCloseButton.style.width = '25px';
  14. animeTableCloseButton.style.top = '1px';
  15. animeTableCloseButton.style.right = '1px';
  16. animeTableCloseButton.style.cursor = 'pointer';
  17. */
  18.  
  19. // Creating element iframe
  20. var animeTableIframe = document.createElement('iframe');
  21. animeTableIframe.id = 'animeTable';
  22. animeTableIframe.style.zIndex = '1';
  23. animeTableIframe.src = 'http://www.anissia.net/anitime/#cl=fafafa%20fafafa%20da1f1f%202e2e2e%20dbdbdb%203b3b3b%203b3b3b%20ffffff%20bdbdbd%20000000';
  24. animeTableIframe.frameBorder = '0';
  25. animeTableIframe.style.width = '250px';
  26. animeTableIframe.style.height = '400px';
  27. animeTableIframe.style.top = '0px';
  28. animeTableIframe.style.right = '150px';
  29.  
  30. // Creating element animeTable
  31. var animeTableContainer = document.createElement('div');
  32. animeTableContainer.id = 'animeTableContainer';
  33. animeTableContainer.style.position = 'absolute'
  34. animeTableContainer.style.display = 'inline-block';
  35. animeTableContainer.style.top = '0px';
  36. animeTableContainer.style.right = '150px';
  37. animeTableContainer.style.height = 'auto';
  38. animeTableContainer.style.width = 'auto';
  39. //animeTableContainer.appendChild(animeTableCloseButton);
  40. animeTableContainer.appendChild(animeTableIframe);
  41.  
  42. // Adding elements into body
  43. document.getElementById('animeTableSlot').appendChild(animeTableContainer);
  44.  
  45. // Function to close the animeTable
  46. function closeAnimeTable() {
  47.   document.getElementById('animeTableSlot').removeChild(animeTableContainer);
  48.   //Will remove the script tag if it is named animeTable.
  49.   document.getElementsByTagName('body')[0].removeChild(document.getElementById('animeTable'));
  50. }
  51.  
  52. /*
  53. // Adding event listeners
  54. animeTableCloseButton.addEventListener("click", function(){closeAnimeTable()}, false);
  55. */
Add Comment
Please, Sign In to add comment