Advertisement
Guest User

Untitled

a guest
Jul 5th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. =============== CONTENT.JS ====================
  2. let n = 0;
  3. function run() {
  4.     var links = document.getElementsByClassName('cur_pointer open_in1 new_act_btn col_in center big_link');
  5.     links[n].click();
  6.     await => sleep(5000);
  7.  
  8.     chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
  9.         // query the active tab, which will be only one tab
  10.         //and inject the script in it
  11.         chrome.tabs.executeScript(tabs[0].id, {file: "like.js"});
  12.     });
  13.  
  14. }
  15.  
  16. run();
  17.  
  18. =============== LIKE.JS ====================
  19.  
  20. function run() {
  21.     document.getElementsByClassName('glyphsSpriteHeart__outline__24__grey_9 Szr5J')[0].click();
  22.     alert('clicked');
  23. }
  24. run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement