Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,tab) {
- if(changeInfo.url){
- console.log("tab url changed");
- chrome.tabs.executeScript(null, {file: "js/jquery-3.2.1.min.js"});
- chrome.tabs.executeScript(null, {file: "payload.js"});
- }
- });
- console.log("ready");
- $(document).ready(function() {
- var button = document.getElementsByClassName("recommend u-flexColumn u-marginBottom10 u-width60")[0];
- if (button) {
- console.log("element is ready");
- }
- });
- chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
- if (changeInfo.url) {
- console.log("tab url changed");
- chrome.tabs.executeScript(tabId, {file: "js/jquery-3.2.1.min.js"});
- chrome.tabs.executeScript(tabId, {file: "payload.js"});
- }
- });
Add Comment
Please, Sign In to add comment