Handle websites with url that keeps changing
MikeZeDev opened this issue · comments
Many websites have a "portal page" that gives or redirect to the real domain. Most of the time its increasing numbers : newtoki144.com, newtoki145.com etc...
In other words, allow a plugin to reassign the url at runtime, or some workaround.
Maybe a private property _realurl set in Initialize, and a getter for "URI" that returns _realurl after initialize was run?
https://cdn.discordapp.com/attachments/581631164398174208/1143865177289277460/image.png
Ads are a problem, and its a pain to maintain a blacklist
The desired behavior can already be achieved by assigning this.URI.href = '...'
in the Initialize()
method of the website plugin
The desired behavior can already be achieved by assigning
this.URI.href = '...'
in theInitialize()
method of the website plugin
Isnt the property readonly? Last time i checked it was.
The desired behavior can already be achieved by assigning
this.URI.href = '...'
in theInitialize()
method of the website pluginIsnt the property readonly? Last time i checked it was.
I think the href
field of the URL interface was never readonly in any browser. Only a few fields, such as origin
are marked as readonly, but origin
is implicitly updated by setting href
.
const uri = new URL('http://a.a/1');
console.log('A:', uri.href, uri.origin);
// => http://a.a/1, http://a.a
uri.href = 'http://b.b/2';
console.log('B:', uri.href, uri.origin);
// => http://b.b/2, http://b.b
I was referring to our class field URI, that is set as readonly. It cant be reaffected, but href can be changed. I am an idiot 😅 . Sorry about that