Commit Graph

130 Commits

Author SHA1 Message Date
Daniel Jacobs d8da4ffaa5 extension: Don't redefine the window.close() method 2024-07-24 17:49:10 +02:00
Daniel Jacobs 141eab4292 extension: Unregister event listeners before adding new ones 2024-07-24 17:49:10 +02:00
Daniel Jacobs 830b5df3dc extension: Request permission for SWF origins loaded in player as needed 2024-07-24 17:49:10 +02:00
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
Nathan Adams f5dc3c8975 web: Enable tseslint.configs.strict (it caught a bug!) 2024-07-08 11:34:35 +02:00
Nathan Adams 6e74f57318 web: Update to eslint 9 2024-07-08 11:34:35 +02:00
Nathan Adams 53d56573c1 web: Migrate to 'flat config' style for eslint 2024-07-08 11:34:35 +02:00
Daniel Jacobs a5a9ef9a03 extension: Don't register 4399 content script if Ruffle is disabled 2024-07-06 12:55:37 +02:00
Nathan Adams 97396a1007 web: Changed installRuffle to always work with window.RufflePlayer, saves boilerplate 2024-06-30 13:09:01 +02:00
Nathan Adams 6827d4f086 web: Rename PublicAPI.negotiate() to a more accurate installRuffle() 2024-06-30 13:09:01 +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 11d73474b2 extension: If popup ping fails, re-send after 0.2 seconds 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 23d8e5617c extension: Revert non-working check 2024-06-24 20:17:34 -04:00
Daniel Jacobs cee3046216 extension: Address review comments 2024-06-24 20:17:34 -04:00
Daniel Jacobs eb64cd530d extension: Make onboarding page look nicer 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
riku 036839fb1f
extension: Fix 4399 CORS and Flash detection issue (close #13943) (#16750)
Co-authored-by: Zhentao Lu <zhentaolu@microsoft.com>
2024-06-21 15:05:53 +00:00
Nathan Adams 148fa6bdf1 web: Fixed some remaining references to tools-as-js 2024-06-12 23:33:01 +02: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 a4550f5091 extension: Add comment about wrappedJSObject 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
Daniel Jacobs f392699f73 extension: Remove Ruffle's own script tag onload 2024-04-14 11:53:28 +02:00
Daniel Jacobs b3c2ef5f42 extension: Cleanup plugin-polyfill inline script on Firefox 2024-04-14 11:47:00 +02:00
Toad06 c847309217 extension: Close `popup.html` when clicking "Open SWF Player" in Firefox 2024-01-16 23:44:10 +01:00
nosamu d97314d315 extension: Bail if postMessage event has no data
Fixes #14486
2024-01-08 18:30:44 +01:00
Daniel Jacobs ffdb248872 demo/extension: Expand iPad check to work for iPadOS 13+ 2023-11-15 08:04:23 -05:00
Kornelius Rohrschneider 514611451f web: Set default Polyfill allowScriptAccess value to samedomain
The default allowScriptAccess value for polyfilled elements has been set
to samedomain. This means that it's true if the SWF file has the same
domain as the player website and false otherwise.
To do this, a new isPolyfillElement parameter is given to the
RufflePlayer::load method.
2023-11-08 17:09:54 +01:00
Kornelius Rohrschneider 1b2baf3364 web: Fix Ruffle extension player not using the configuration for files
The Ruffle extension player has previously not used the extension
configuration settings when loading local SWF files.
This has been fixed.
2023-11-08 17:09:54 +01:00
Kornelius Rohrschneider 8c8367a09c web: Fix Ruffle configuration not working properly for Polyfill elements
Previously, the Ruffle configuration options weren't working properly
for polyfilled elements.

A polyfilled element can have specific configuration options which
overwrite the more general Ruffle configuration settings.
But the code handling those specific configuration options has
previously set some of them to default values if they haven't been
provided, therefore overwriting the more general configuration settings.
This has been fixed. A getPolyfillOptions function has been created and
returns a URLLoadOptions object, containing only the options that have
been set for the respective element. Helper functions have been adapted
to not return any default values anymore.
getPolyfillOptions is now used in all places where polyfilled options
need to be retrieved (therefore reducing duplicated code).

Documentation has been added to clarify that these options must not
contain any default values, since those would overwrite other
configuration settings with a lower priority.
The extension and demo code has been changed to clarify that no default
values are contained in the element configuration options.

The RuffleEmbed::attributeChangedCallback method has previously loaded
an SWF file only with the parameters and base options. This has been
fixed as well since it now also uses getPolyfillOptions.

When using RuffleObject::connectedCallback to load an SWF file, setting
an element config option to "" hasn't worked for most config options
before either. This has been fixed as well by using the new
getPolyfillOptions function.

The default WindowMode value of the default Ruffle web config has been
set to Window (as it is in the desktop version and according to the
documentation). It has previously been set to Opaque (which causes the
same functionality).
2023-11-08 17:09:54 +01:00
Wumbo 4403848a4b
web: Extension UI improvements (#13473)
* web: Improve styling of extension pop-up menu

* web: Improve styling of extension settings page

* web: Improve styling of extension player

* web: Make styling more consistent across browsers

* web: Run eslint, fix some problems

* web: Move version text near top of pop-up menu, add to settings menu

* web: Improve logo hover bounds in pop-up and settings

* web: Improve styling of extension status indicator

* web: Update extension pop-up text strings

* web: Misc. sizing/padding changes to extension UI

* web: chore: Add a stylelint exception for #backgroundColor in player.css

Because it's not kebab-case, to match the keys of the metadata object in JS.

---------

Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
2023-11-03 23:07:25 +01: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
Daniel Jacobs acc315ebfb extension: Fix check for scripting permission 2023-08-22 22:47:28 +02:00
Daniel Jacobs eef65da345 extension: Remove unnecessary lambda functions 2023-08-22 22:17:18 +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
Daniel Jacobs ba52438c27 extension: Fix-ups for extension player page 2023-08-22 17:50:37 +02:00
Daniel Jacobs 1a28f83229 extension: Address review feedback 2023-08-20 19:51:14 +02:00
Nathan Adams d5fa0f56ea web: Make loadedConfig private again, add reload() method instead 2023-08-20 19:51:14 +02:00
Daniel Jacobs e7df6d890e extension: Make the player page a local Ruffle demo 2023-08-20 19:51:14 +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 7533923f9b web: Remove check for RufflePlayer in content.ts - it can't possibly ever be true 2023-08-14 21:21:20 +02:00
Nathan Adams 1ec12f0931 web: Inject polyfill via url instead of inline, 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