Skip to content

Conversation

samuellouf
Copy link
Contributor

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 :
Logo

And here is the banner :

Wikipedia Banner

samuellouf and others added 6 commits October 2, 2023 18:40
Added my Wikipedia extension to the list
Replaced 'fetch()' by 'Scratch.fetch()'
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
@github-actions github-actions bot added the pr: new extension Pull requests that add a new extension label Feb 19, 2025
@NexusKitten
Copy link
Contributor

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
@samuellouf
Copy link
Contributor Author

Oh! Ok. Thanks!

@samuellouf
Copy link
Contributor Author

Finished!

Copy link
Contributor

@Brackets-Coder Brackets-Coder left a 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...

Comment on lines +166 to +167
"---",
"---",
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no Idea

Comment on lines +212 to +214
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=*`
)
Copy link
Contributor

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...

  1. it could go down
  2. it could be whitelisted

Copy link
Contributor Author

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

@Brackets-Coder
Copy link
Contributor

@CubesterYT we closing this one too for the same reasons as #1972?

@PPPDUD
Copy link
Contributor

PPPDUD commented Sep 17, 2025

@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:

  • Newgrounds
  • Game Jolt
  • Longman Dictionary

Copy link
Contributor

@PPPDUD PPPDUD left a 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.

@Brackets-Coder

This comment was marked as resolved.

@Brackets-Coder

This comment was marked as resolved.

@PPPDUD

This comment was marked as resolved.

@Brackets-Coder

This comment was marked as resolved.

Copy link
Contributor Author

@samuellouf samuellouf left a 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!

@PPPDUD
Copy link
Contributor

PPPDUD commented Sep 19, 2025

My bad! English is my second language. Thanks for noticing!

Happy to help! Thank you for letting contributors make changes to your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new extension Pull requests that add a new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants