-
Notifications
You must be signed in to change notification settings - Fork 3
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
Can't open repository page #39
Comments
Well, it seems that whenDefined isn't supported by your browser. Wait a moment, please, will fix it in a minute |
I hope v4.3.2 is okay :) |
Note: in fact, custom elements are supported by the browser, but access to this functionality from content scripts is limited (as far as I can say by this issue) |
Still broken. But now there's no error on console, the loading just keeps spinning forever. Checking the HTML it's normal crappy GitHub. |
Hm. It's really strange. I'm very sorry for the inconvenience, tomorrow I'll try to find a solution to this problem |
If the problem persists, could you run this snippet on the repository page while it refuses to load, please? const refSelector = document.querySelector("#branch-select-menu ref-selector");
console.log(refSelector.constructor);
await refSelector.index.fetchData();
console.log(refSelector.index.currentSearchResult); If that snippet did work, could you check if content scripts in your browser have access to // ==UserScript==
// @name RefSelectorElement test
// @namespace GitHub
// @version 0.1
// @match https://github.com/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
"use strict";
alert(window.RefSelectorElement ? "RefSelectorElement is accessible" : "RefSelectorElement is not accessible");
})(); |
The output is the same as your image and putting The same problem is happening on Firefox 78. |
Oh. Now I see. But I can't understand 2 things:
|
Yes, not "write" to it seems reasonable so you don't need to worry about your variables breaking the page, but reading is pretty dumb.
At first I thought it could be you using Firefox, but it fails on mine and you have tested on Chromium. But maybe it's how we have installed it. Are you using your XPI for Firefox? Or GreaseMonkey? |
Completely agree! "This means that content scripts can rely on DOM properties behaving predictably, without worrying about its variables clashing with variables from the page script." Guys, "DOM properties behave predictably" when and only when they work same way they do when I'm browsing the website I made the script for...
Ahaha, I forgot about GreaseMonkey :D I use TamperMonkey (yep, I know it's closed-source and so on, but I'm just used to it) and it seems it doesn't use Content Script API :D |
Well, I hope I've fixed the issue (+1 api call due to Content Script API restrictions -_-). Could you please check if this fix works for you, so I won't release broken version again? :D You can grab build artifacts here |
I don't use GreaseMonkey either, I used to use ViolentMonkey, but now I just create a pseudo-extension with a manifest and load from disk. For Firefox I use your XPI.
It works now. 👍 |
Isn't it a little bit tedious to do all of these manually? Why did you stop using ViolentMonkey?
Finally, haha :) I'll make few more changes (aka fixes, e.g., busy status is broken again) and then will release new version Thank you so much for helping out with this one! I'm always too lazy to check that everything works outside of my usage scope (Firefox + userscript), so Chrome/Web Extension bugs are unnoticeable for me :D |
v4.3.3 (which fixes the issue) was published :) |
I just need to create the manifest once and then I just download the
It runs over every page even though my userscripts only run over some pages, Chromium will handle that faster and more secure for me. And the only userscript I use that I have not created is yours so I don't care about manually updating it. |
Oh, I see, that's reasonable :) |
Description
The repository page does not want to open with 4.3.1, had to revert to 4.3.0. Error log is below.
Everything else works.
Log
Other information
The text was updated successfully, but these errors were encountered: