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

Script not getting injected in https://kemono.su/ website #2323

Open
nandakishore2009 opened this issue Jan 10, 2025 · 8 comments
Open

Script not getting injected in https://kemono.su/ website #2323

nandakishore2009 opened this issue Jan 10, 2025 · 8 comments

Comments

@nandakishore2009
Copy link

nandakishore2009 commented Jan 10, 2025

Expected Behavior

Expected tampermonkey script to be injected in kemono.su website load.

Actual Behavior

No tampermonkey scripts are getting injected in kemono.su website load. Even in chrome devtool->source->Page no Tampermokey script file is available,

Specifications

  • Chromium: 131.0.6778.265

Script

Test script

// ==UserScript==
// @name         Test Userscript
// @namespace    kemono
// @version      2025-01-10
// @description  try to take over the world!
// @author       You
// @match        https://kemono.su/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=kemono.su
// @grant        none
// ==/UserScript==

(function() {
    console.log("Tampermonkey test log")
})();
@nandakishore2009 nandakishore2009 changed the title Tampermonkey not getting injected in https://kemono.su/ Script not getting injected in https://kemono.su/ website Jan 10, 2025
@derjanb
Copy link
Member

derjanb commented Jan 10, 2025

This is working fine here.

Please check the page console (ctrl+shift+j) for errors, also please check the service worker state -> #2221 (comment)

@Ugly-Guy
Copy link

I'm having a similar issue
Scripts do not load like 70% of the times I load a page from a specific website. Other times they just never load unless I restart the browser.

It works with no issues on other websites

I'm on Chromium 131.0.6778.265 too

@nandakishore2009
Copy link
Author

nandakishore2009 commented Jan 14, 2025

Hi @derjanb, 95% of times when I load the site the script doesn't get loaded, and yes I did check the page console.
image

One of the observation particular to this site is its using Wasm.

@Leproide
Copy link

Same problem here.
https://raw.githubusercontent.com/Leproide/Amazon_URLShortener/refs/heads/main/Amazon_URLShortener.js
That works on Firefox but not on Chrome

@derjanb
Copy link
Member

derjanb commented Jan 22, 2025

@Leproide This script uses an invalid @match and works neither in Chrome nor Firefox.

You have to change the @match to @include. It's not possible to match all TLDs with @match.

host: A hostname (www.example.com). A * before the hostname to match subdomains (*.example.com), or just a wildcard *. - If you use a wildcard in the host pattern, it must be the first or only character, and it must be followed by a period (.) or forward slash (/).

See https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns

@derjanb
Copy link
Member

derjanb commented Jan 22, 2025

95% of times when I load the site the script doesn't get loaded, and yes I did check the page console.

Still can't reproduce. This example script logs the new URLs all the time. I can get the script disappear from the page script list by navigating to another page and then back, which seems to be a back-forward-cache issue, but new URLs are still being logged...

// ==UserScript==
// @name         Log Location
// @namespace    http://tampermonkey.net/
// @version      2024-08-29
// @description  try to take over the world!
// @author       You
// @match        https://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        GM_info
// @grant        window.onurlchange
// ==/UserScript==

const newURL = () => console.log('#####', location.href);
window.addEventListener('urlchange', newURL);
console.log(GM_info);
newURL();

@nandakishore2009
Copy link
Author

Hi @derjanb,

Do you know any option to enable tampermonkey log, so that I can reproduce the issue & share the log.

PS: I tried changing match to include, the issue is still reproducible.

@Leproide
Copy link

Leproide commented Feb 2, 2025

@Leproide This script uses an invalid @match and works neither in Chrome nor Firefox.

You have to change the @match to @include. It's not possible to match all TLDs with @match.

host: A hostname (www.example.com). A * before the hostname to match subdomains (*.example.com), or just a wildcard *. - If you use a wildcard in the host pattern, it must be the first or only character, and it must be followed by a period (.) or forward slash (/).

See https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns

Hi,
on firefox i use violentmonkey and works with match, now i can try with include, tnx

EDIT:
With @include the script works, tampermonkey want this (on violentmonkey @match works too)

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

No branches or pull requests

4 participants