-
Notifications
You must be signed in to change notification settings - Fork 187
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
Extension disabled after clicking on a target _blanck link (or window.open()) #639
Comments
I quickly wrote the following script as you described, but it works fine in my iOS Safari. Try opening https://example.com/ and clicking on the // ==UserScript==
// @name DEBUG.test1
// @match *://*.example.com/*
// @match *://*.example.net/*
// @match *://*.example.org/*
// @run-at document-end
// ==/UserScript==
(function () {
'use strict';
const d = document.querySelector("body>div");
const a = document.createElement("a");
a.textContent = "example.net";
a.href = "https://example.net/";
a.target = "_blank";
const b = document.createElement("button");
b.textContent = "window.open";
b.onclick = () => window.open("https://example.net/");
d.append(a, b);
})(); |
This is exactly the problem I got, that you point out here but in my case, I can’t see anymore the buttons on new tab. I put a record screen video to show you. (Tried to disable all extensions…). However i noticed that doing a long click, then opening in new tab solve the problem. https://drive.google.com/file/d/1UihZWvUyW07S_RwBghh0lb1ARKDsRJRQ/view?usp=drivesdk Edit: the problem seem to happen only in current tab (not in private) maybe a kind of cache issue ? Edit n°2: I realized that in the video I sent, the loading was surprisingly very fast and, the page was already downloaded, I clear cache and history and it seems that it works now. It is weird. It seems that new tab API open the cache page without the extension. Edit n°3 (sorry lol): |
That's odd, although I don't think caching should affect how the extension works. Do you have a macOS device? That would help us get more information, such as whether the extension's content scripts are being injected. (Refer to #409) I also need to think about why the extension popup shows no matches in your case, as that's a different process. Just to confirm, could you check if the extension has the "Allow in Private Browsing" switch turned on? Also is it allowed to run on every website? Just in case, would trying removing and reinstalling the extension App help in any way? Also, try our latest beta version and see if it makes a difference: https://github.com/quoid/userscripts/releases |
No unfortunately, i don't.
Yes of course, check a lot of time and juste verified again, the switches are turned on, allow in private browser: on, Allow extension: on, Others websites: Allow.
Tried both, the same issue occured. But something interesting: I notice IOS 17.5 Beta is available to install, i will try to install it and i'll keep you informed. But there is no one modifications in "Safari Extensions" section in the changelog so I don't think that will change anything but you can never be sure ! |
Sorry, I really can't reproduce your issue in iOS17.4.1 on my local. It sounds like this is happening in your specific device environment and is not related to this specific extension. You're right, don't trust Apple's changelog, they never clearly list every changes. Although unlikely, have you ever changed Safari's settings or experimental features? Sorry, I’m out of ideas, perhaps you should ask Apple for help (although unlikely to get a reply). |
I installed IOS 17.5, nothing changed as I espected.
Yes I had switched on some flags like Fullscreen API. In the doubt I reset all settings to Default but still nothing. And here is the userscript:
Here is the video |
I believe you are referring to "Advanced Tracking and Fingerprinting Protection", which is enabled by default in Privacy mode and you can adjust it in Safari advanced settings. But I think that should have nothing to do with the problem you encountered, and my local test has no effect. Because of your previous description, I don't think the problem is related to a specific user script and even a specific extension, so trying your script doesn't seem to help. It looks like all extensions are not working in your specific tabs. I have absolutely no idea why this is happening. I hate to say it, but aside from turning to Apple, maybe the only viable option is to back up your data and then try to reset the system. |
Hello, I have a problem on ios extension, for a few months but I don't understand why this is happening until this night. Let me explain:
Sometimes it seems that all extensions are disabled and user scripts are not applied on the web page.
I found that when clickink on a link which open a new tab, or when you're calling window.open method, the extension suddenly breaks even if you open a native link (on the original webpage).
I create a script on a webpage that add a button to get some data from the page and open a page in a new tab with a link and that data in url params. Then on the page that has just opened i want to get ths data with another userscript and then do some stuff with this.
But it appear that when clicking on the button (also tried with creating a link, target="_blank"...) the url with params open correctly, but the second userscript will not execute. And no other, even if we disable/re enable the extension or the script and even if we refresh the page. The tab seem to be broken and i didn't manage to execute the script on tha tab (opened with window.open()). But if i copy the link and open it in another tab, then the userscript will execute.
My scripts not seem to be the source from the problem because i test this even with some really basic userscript that just open a link in new tab and then try to alert() something.
The text was updated successfully, but these errors were encountered: