Greasy Fork is available in English.

議論 » 開発

Help making ruffle to work

§
投稿日: 2024/03/30
編集日: 2024/03/30

Greetings!

Here is a JS code that would allow ruffle to load SWF on a given page which has SWF embedded.

(function() {

  // The @require directive will automatically load Ruffle, so no further action is needed.
  'use strict';

  // The following code is used as a backup system.
  let ruffleScript = document.createElement('script');

  // Use the CDN version of Ruffle
  ruffleScript.src = 'https://unpkg.com/@ruffle-rs/ruffle';

  document.head.appendChild(ruffleScript);

})();

It would be good to know how to make that code to work as userscript, loading the ruffle library from metablock // @require https://unpkg.com/@ruffle-rs/ruffle/ruffle.js

See:

Thank you for any help!

返信を投稿

返信を投稿するにはログインしてください。