-
Notifications
You must be signed in to change notification settings - Fork 294
Added Wikipedia extension (fixed) #1941
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
base: master
Are you sure you want to change the base?
Conversation
Added my Wikipedia extension to the list
Replaced 'fetch()' by 'Scratch.fetch()'
…into Wikipedia
Detail : - Created my own logo (Puzzle piece with a W) - Added License - Returns empty strings instead of 'Error : [...]' - Added a fallback empty string for "getLanguage" - Removed "isString" cause I didn't need it - Switched the function names to camel case - Removed "wikipedia" from the function names - Added "addLanguage" - Edited JSON array filter to return JSON objects - Made a banner
Just for future reference, I'm pretty sure you're allowed to reopen a commit marked as stale if you've updated it. Typically, there's nothing wrong with a stale PR, they're just closed to cut down on the amount of inactive pull requests. |
- Changed User Adress - Removed text from banner
Oh! Ok. Thanks! |
Finished! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks alright, but I don't know about merging this, there's some crazy stuff on Wikipedia...
"---", | ||
"---", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there two breaks here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no Idea
return Scratch.fetch( | ||
`https://${this.wikipediaLanguages}.wikipedia.org/w/api.php?action=query&prop=extracts&exlimit=1&titles=${encodeURIComponent(args.NAME)}&explaintext=1&exsectionformat=plain&format=json&origin=*` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about you, but I think we didn't like referencing external domains? I know some other extensions do it so I'm unsure...
- it could go down
- it could be whitelisted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh... I didn't think about that.
You're probably right
@CubesterYT we closing this one too for the same reasons as #1972? |
Please do not close this. It does not threaten the safety, security, or privacy of the user and would already be possible with Fetch, albeit painfully. I'll point out that TurboWarp also has a number of other extensions that would be useless without an external service, including but not limited to:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the block for adding languages. All of the languages that one would want for this extension should already be added.
Edit: I also think that the color of the blocks is a bit too light, and it only looks good with dark blocks enabled. With high contrast blocks, it nearly burned my eyes out.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad!
English is my second language.
Thanks for noticing!
Happy to help! Thank you for letting contributors make changes to your PR! |
Hello!

I'm re-pulling my "Wikipedia" extension.
I fixed the issues adressed it my previous pull request (#1075) :
See here.
It still uses MediaWiki public API.
Enjoy !
Post-scriptum :
Here is the logo :
And here is the banner :