Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. <br>
  2. <p style="text-align: center; margin-top:10px;"><a href="ts3server:5.39.54.196" class="VGB1" id="TS3Link">Click to join Teamspeak</a></p>
  3. <br>
  4. <p style="text-align: center; margin-top:10px;"><a href="#" class="VGB2" id="copyButton2">Copy Arma 3 Sync Link</a></p>
  5. <br>
  6. <p style="text-align: center; margin-top:10px;"><a href="#" class="VGB3" id="copyButton">Copy Arma 3 Server IP</a></p>
  7.  
  8.  
  9.  
  10.  
  11. <script>
  12. function copyText(text){
  13. function selectElementText(element) {
  14. if (document.selection) {
  15. var range = document.body.createTextRange();
  16. range.moveToElementText(element);
  17. range.select();
  18. } else if (window.getSelection) {
  19. var range = document.createRange();
  20. range.selectNode(element);
  21. window.getSelection().removeAllRanges();
  22. window.getSelection().addRange(range);
  23. }
  24. }
  25. var element = document.createElement('DIV');
  26. element.textContent = text;
  27. document.body.appendChild(element);
  28. selectElementText(element);
  29. document.execCommand('copy');
  30. element.remove();
  31. }
  32.  
  33. var btn = document.getElementById('copyButton');
  34. btn.addEventListener('click', function(){
  35. copyText("5.39.54.196:2302");
  36. btn.innerHTML = "Copied to clipboard";
  37. })
  38.  
  39.  
  40. document.getElementById("copyButton").onmouseover = function() {mouseOver()};
  41. document.getElementById("copyButton").onmouseout = function() {mouseOut()};
  42.  
  43. function mouseOver() {
  44. document.getElementById("copyButton").innerHTML = "Copy IP";
  45. }
  46.  
  47. }
  48. </script>
  49.  
  50. <script>
  51. function copyText(text){
  52. function selectElementText(element) {
  53. if (document.selection) {
  54. var range = document.body.createTextRange();
  55. range.moveToElementText(element);
  56. range.select();
  57. } else if (window.getSelection) {
  58. var range = document.createRange();
  59. range.selectNode(element);
  60. window.getSelection().removeAllRanges();
  61. window.getSelection().addRange(range);
  62. }
  63. }
  64. var element = document.createElement('DIV');
  65. element.textContent = text;
  66. document.body.appendChild(element);
  67. selectElementText(element);
  68. document.execCommand('copy');
  69. element.remove();
  70. }
  71.  
  72. var btn = document.getElementById('copyButton2');
  73. btn.addEventListener('click', function(){
  74. copyText("ftp://31.3.230.52/.a3s/autoconfig");
  75. btn.innerHTML = "Copied to clipboard.";
  76. })
  77.  
  78.  
  79. document.getElementById("copyButton2").onmouseover = function() {mouseOver()};
  80. document.getElementById("copyButton2").onmouseout = function() {mouseOut()};
  81.  
  82. function mouseOver() {
  83. document.getElementById("copyButton2").innerHTML = "Copy Arma 3 Sync Link";
  84. }
  85.  
  86.  
  87. }
  88. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement