Ruffle Flash Player

Play flash (.swf) files

  1. // ==UserScript==
  2. // @name Ruffle Flash Player
  3. // @namespace i2p.schimon.ruffle
  4. // @description Play flash (.swf) files
  5. // @homepageURL https://schapps.woodpeckersnest.eu/
  6. // @supportURL https://gf.qytechs.cn/en/scripts/490282-flash-player-ruffle/feedback
  7.  
  8. // @copyright 2024, Schimon Jehudah (http://schimon.i2p)
  9. // @license MIT; https://opensource.org/licenses/MIT
  10. // @match file:///*
  11. // @match *://*/*
  12. // @version 25.03
  13. // @grant none
  14. // @icon data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48dGV4dCB5PSIuOWVtIiBmb250LXNpemU9IjkwIj7imqE8L3RleHQ+PC9zdmc+Cg==
  15. // ==/UserScript==
  16.  
  17. // Please help https://openuserjs.org/garage/Help_making_ruffle_to_work
  18. // @require https://unpkg.com/@ruffle-rs/ruffle/ruffle.js
  19.  
  20. function activateRuffle() {
  21.  
  22. // The @require directive will automatically load Ruffle, so no further action is needed.
  23. 'use strict';
  24.  
  25. // The following code is used as a backup system.
  26. let ruffleScript = document.createElement('script');
  27.  
  28. // Use the CDN version of Ruffle
  29. ruffleScript.src = 'https://unpkg.com/@ruffle-rs/ruffle';
  30.  
  31. document.head.appendChild(ruffleScript);
  32.  
  33. };
  34.  
  35. function infoBar() {
  36. let namespace = 'i2p-schimon-ruffle';
  37. let bar = document.createElement(namespace);
  38. document.body.append(bar);
  39. bar.innerHTML = '⚡ Activate Ruffle Flash Player';
  40. bar.title = 'Flash elements have been detected on this page. Click this bar to activate Ruffle player.';
  41. bar.id = namespace;
  42. bar.style.backgroundColor = '#37528c';
  43. bar.style.color = '#ffad33';
  44. bar.style.fontFamily = 'system-ui';
  45. bar.style.fontSize = 'larger';
  46. bar.style.fontWeight = 'bold';
  47. bar.style.right = 0;
  48. bar.style.left = 0;
  49. bar.style.top = 0;
  50. bar.style.zIndex = 10000000000;
  51. bar.style.padding = '6px'; //13px //15px //11px //9px //3px //1px
  52. bar.style.position = 'fixed';
  53. bar.style.textAlign = 'center'; // justify
  54. bar.style.direction = 'ltr';
  55. bar.style.userSelect = 'none';
  56. // set bar behaviour
  57. bar.onclick = () => {
  58. bar.style.display = 'none';
  59. activateRuffle();
  60. };
  61. }
  62.  
  63. (function() {
  64.  
  65. if (document.querySelector('embed[src$=".swf"]')) {
  66. infoBar();
  67. }
  68.  
  69. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址