Generate new access token key automatically
cdrani / kdrama Goto Github PK
View Code? Open in Web Editor NEWGenerate new access token key automatically
Generate new access token key automatically
Currently clicking on the browser action redirects you to the reddit page, then the Generate Token page, but then back to the initial Access Denied page from the beginning. A second click resolves this and takes you straight to the fully accessible kdrama site page. It could be an issue that the second executeScript is called too early. Keep in mind that the extension redirects from page to page almost immediately, but the token generation might need slightly more time to finish before redirection. Adding such a case might fix this issue.
Notify users that tokens have expired and that once they visit the site they will need to click on the browser action. An ideal notification would just be adding a badge on the extension icon. As the tokens expire every 5 days from the day of generation, there are potentially two solutions:
Just get the date that the browser actions was clicked and then exactly five days later (I think that's how long before the tokens expire) add the badge to notify the user.
When a token is generated and user is redirected to kdrama site, the token expiration date and time is shown at the footer of the page. You can access this info to notify the user at a more precise time that their token is about to expire and/or expired.
Ideally the second option is better, but either would work just as well.
The current icons of Corvo aren't really conducive to what the purpose of this extension is, therefore a change is highly suggested.
There must be a way to implement this extension that the user only has to interact with it only once or not at all. Why wait for browser action to be clicked and then run your actions? Why not just run the actions when the url matches the page url and the page has the Access Denied text in the title or body?
At the page with the 'Generate Access Token' button, the page is not then redirected to the goplay homepage. It appears that the button is no longer being "clicked". This is most likely due to the change in document title. Notice the current code in js/gen_token.js:
if (document.title === 'Token Generation - Korean Shows HD Streaming') {
var genButton = document.querySelector('button')
genButton.click()
}
The current title is now 'Token Generation - GoPlay Streaming'. Either update the above file with the new token or make the code more relaxed with by stipulating that the title contains 'Token Generation' in it using a regex match.
Support various languages such as english, spanish, french, and korean. Additional language support will follow if the need arises.
Currently the extension can be activated from any url. If the intend is to have it just activate on certain urls, then that is an issue. However, this could be considered a feature - launching the site just by clicking the extension icon.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.