Commit Graph

30 Commits

Author SHA1 Message Date
Daniel Jacobs ecc3cc4242 extension: Change from switch/toggle to proper boolean for tab reload 2024-07-17 14:54:13 -04:00
Daniel Jacobs 95ac802c4d extension: Don't auto-reload tab when permissions are granted 2024-07-17 14:54:13 -04:00
Daniel Jacobs a5a9ef9a03 extension: Don't register 4399 content script if Ruffle is disabled 2024-07-06 12:55:37 +02:00
Daniel Jacobs 948987b743 extension: Only show onboarding page on first install 2024-06-28 13:31:23 -04:00
Daniel Jacobs 3b6cc37324 extension: On Chrome, adding permissions for a specific site adds many 2024-06-24 20:17:34 -04:00
Daniel Jacobs 8af4454012 extension: Reload the tab when non-<all_urls> host permission added 2024-06-24 20:17:34 -04:00
Daniel Jacobs 9aa027311d extension: Upgrade Firefox to Manifest V3 2024-06-24 20:17:34 -04:00
Daniel Jacobs a071b9ea3f extension: Don't use scripting API for plugin polyfill where unsupported 2024-06-12 23:15:39 +02:00
Daniel Jacobs e1efe90dbd extension: Polyfill plugin using scripting API when MAIN world supported 2024-06-12 23:15:39 +02:00
Daniel Jacobs c0d094a948 extension: Use scripting permission for Flash spoofing on Firefox too 2024-06-12 23:15:39 +02:00
Daniel Jacobs 99eaf7ac2c extension: Add exclusions for Time4Learning and Edgenuity 2024-05-01 15:40:42 -04:00
nosamu b456296769 extension: Persist content script registration across sessions 2023-08-26 01:21:07 +02:00
nosamu 3920eb90cd extension: Register listeners synchronously at top level of service worker 2023-08-25 23:56:52 +02:00
Nathan Adams 9d05a37f34 web: Make open-in-new-tab open the local player directly, and disable takeover of all SWF urls 2023-08-22 19:35:05 +02:00
Nathan Adams ee8da51c6b web: Use 'chrome?.scripting' to test for direct vs indirect pluginPolyfill pmethod, as firefox pretends to be chrome here 2023-08-14 21:21:20 +02:00
Nathan Adams 49d0d417c2 web: Make firefox also use the hash for player.html swf url 2023-08-14 21:21:20 +02:00
Nathan Adams 2f9387f1ac web: Inject plugin polyfill immediately, on chrome/edge 2023-08-14 21:21:20 +02:00
Nathan Adams 71000dd19a web: When using manifest v3, do swf takeover using declarativeNetRequest 2023-08-14 21:21:20 +02:00
Nathan Adams 3447b8bfdd chore: npm run format 2023-07-20 14:00:04 +02:00
Toad06 7830a8232b
web: Allow extra MIME types in the polyfill 2023-05-30 06:35:29 +00:00
relrelb 52e395ecca extension: Use `@tsconfig/strictest` 2023-02-22 21:39:12 +02:00
nosamu 4dc446825b extension: Check more thoroughly for SWF filenames and MIME types 2022-08-29 02:49:23 -07:00
nosamu 20d4149fe4 extension: Check for all octet-stream MIME types
When a server returns a `.swf` file with an octet-stream MIME type, Ruffle should treat it as an SWF. Right now the extension checks specifically for the `application/octet-stream` MIME type, which leaves out servers like [MaxGames](https://farm.maxgames.com/soldier-diary-13469MTU5MA==.swf) that use the `binary/octet-stream` type instead. Check if the MIME type ends with `octet-stream` to handle both cases.
2022-04-18 09:01:10 -07:00
Mike Welsh 0e26fa1191 extension: Allow loading SWFs in frames (fix #6582)
If a frame directly loaded an SWF, it would not display in Ruffle.
Add `subframe` to the types intercepted by the `onHeaderReceived`
event in the background script so that Ruffle will display the SWF
in the frame.

Fixes #6582.
2022-04-03 15:17:41 -07:00
nosamu f23c03129a
extension: URL-encode the SWF URL for the player page
When the user clicks the "Open in a new tab" button, the extension's internal `player.html` page opens, with a URL parameter `?url=[the SWF URL]`. Right now, this URL parameter is not properly encoded. This causes a problem when we get to https://github.com/ruffle-rs/ruffle/blob/master/web/packages/extension/src/player.ts#L14:
> `const swfUrl = url.searchParams.get("url");` 
Because the value "url" parameter was not properly encoded, any `&` character in the SWF URL would be interpreted as the start of a *new* parameter, instead of being part of the actual SWF URL. So anything after the first `&` symbol in the SWF URL would be chopped off.
On Itch.io Flash pages such as https://rarykos.itch.io/hug-me-im-cold, the SWF URL contains several important parameters - if they are not included, the server returns 403 Forbidden (it's a type of hotlinking protection). So when the user clicked the "Open in a new tab" button on Itch.io pages, the SWF would refuse to load in the player.
This PR fixes the problem - Itch.io SWFs load when opened in a new tab after my change is applied.
2022-01-24 19:01:11 -08:00
relrelb b250dd5ff1 extension: Fix popup reload tab button
Previously the popup page fetched only the `ruffleEnable` and `ruffleOptout`
options because only those appear in `popup.html`. So the remaining
options were always returned with their default value, making the popup
page think that all tabs need to be reloaded when these options have a
non-default value.

Remove the `keys` parameter of `getOptions`, and instead make it always
return all options. Adapt all usages of `getOptions`, which got simplified
by this change.
2021-10-02 08:58:31 +03:00
relrelb f8a8b82c04 web: Cleanup ESLint configuration
* Cleanup .eslintrc.json files.
* Avoid unnecessary eslint-* directives.
2021-04-30 18:16:55 -07:00
relrelb 488e4421e9 extension: Lint after TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb cfc57a2e1d extension: Complete TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb b0c6cfe1d3 extension: Initial TypeScript migration 2021-04-23 16:58:13 -07:00