Meteor's activities

try to take a guess

  1. // ==UserScript==
  2. // @name Meteor's activities
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take a guess
  6. // @author Salmon
  7. // @match /^https{0,1}:\/\/((www|my)\.(heroeswm|lordswm)\.(ru|com)|178\.248\.235\.15)\/(army_info).php*/
  8. // @include /^https{0,1}:\/\/((www|my)\.(heroeswm|lordswm)\.(ru|com)|178\.248\.235\.15)\/(army_info).php*/
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @license MIT
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. let srcList = [];
  17. const download_img_btn = document.createElement('a');
  18. download_img_btn.innerText = 'Картинка';
  19.  
  20. const parent_elem = document.getElementsByClassName('info_header_content')[0];
  21.  
  22. window.addEventListener("load", () => {
  23. let images = document.getElementsByTagName('img');
  24.  
  25. for(let i = 0; i < images.length; i++) {
  26. srcList.push(images[i].src);
  27. }
  28. download_img_btn.href = srcList[0];
  29. download_img_btn.target = '_blank';
  30. })
  31.  
  32. parent_elem.appendChild(download_img_btn);
  33.  
  34. })();