Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on specific url #2336

Open
aliraza948 opened this issue Jan 20, 2025 · 2 comments
Open

Not working on specific url #2336

aliraza948 opened this issue Jan 20, 2025 · 2 comments

Comments

@aliraza948
Copy link

// ==UserScript==
// @name LinkdIn
// @namespace http://tampermonkey.net/
// @Version 2025-01-18
// @description try to take over the world!
// @author You
// @match https://www.linkedin.com/mynetwork/grow/*
// @ICON data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==

(function() {
'use strict';

// Sample JSON data to convert to CSV
alert(`hey`)

})();

@7nik
Copy link

7nik commented Jan 20, 2025

Is it the same as in #1897?

@aliraza948
Copy link
Author

// ==UserScript==
// @name LinkdIn
// @namespace http://tampermonkey.net/
// @Version 2025-01-18
// @description try to take over the world!
// @author You
// @match https://www.linkedin.com/mynetwork/grow/*
// @ICON data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant window.onurlchange
// ==/UserScript==

function matchScript ({ url }) {
if (url.startsWith("https://www.linkedin.com/mynetwork/grow/")) {
runScript();
}
}

window.addEventListener("urlchange", matchScript);

matchScript({ url: location.href }); // check the initial location

function runScript () {
// main code
alert(good)
}

see where i'm wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants