sjehuda / Flash Player (ruffle)

This script is incredibly vague and includes/matches too widely. Secondly the external host is at a tipping point for obfuscation. It's interesting that some are trying to get Flash back but inappropriate to inject everywhere and yet do nothing.

This is your 2nd strike btw... more than most people get.

Please fix the script so it doesn't get flagged again and you will be removed for TOS violations.

OUJS Admin

This usercsript has been tested on pages that include embedded SWF files.

This script does work on Falkon web browser and appears to not work on Firefox.

Is there anything vague in the script itself, or is it only the description? (which is now in place)

You still are:

includes/matches too widely

... and you are still:

inappropriate to inject everywhere and yet do nothing.

with the remaining @require.

I'm giving you time because you are asking.

I'm going to spell it out for you.

  • You should not inject a script into every page unless the user requests it and is fully informed before installation... typically in their .user.js engine (Greasemonkey, Tampermonkey, Violentmonkey, etc.) by their own hand or by a request to you to have it covered somewhere specific. There are some exceptions for top/down button scripts but they also don't usually inject foreign, out of your control, code.
  • You should improve the @description when finished and also with saying how, exactly, to use this with your "Edit script info" page.
  • You should provide an example web page that it works on and for now use that as a @match and/or @include instead of every web page.

OUJS Admin

You should not inject a script into every page unless the user requests it and is fully informed before installation... typically in their .user.js engine (Greasemonkey, Tampermonkey, Violentmonkey, etc.) by their own hand or by a request to you to have it covered somewhere specific. There are some exceptions for top/down button scripts but they also don't usually inject foreign, out of your control, code.

The following code would make SWF to work, even after page has been completely loaded:

javascript:(function(){'use strict';let ruffleScript=document.createElement('script');ruffleScript.src='https://unpkg.com/@ruffle-rs/ruffle';document.head.appendChild(ruffleScript)})();

So I was thinking of scanning for SWF and once found, a bar at the top or an icon at the corner would show up asking to activate SWF (i.e. activate that one-line code); alternatively, I might occupy SWF elements just as done with
swf2js.

You should improve the @description when finished and also with saying how, exactly, to use this with your "Edit script info" page.

I will do so, once the task is done.

You should provide an example web page that it works on and for now use that as a @match and/or @include instead of every web page.

An example page could be this https://randomfoo.net/oscon/2002/lessig/free.html


The script is currently not working (see source code).

May I postpone this task, and if yes, then for how long?

Re: @sjehuda:

May I postpone this task, and if yes, then for how long?

No you may not. If it doesn't work keep it locally. The only way to clear the Flag is to either fix it, or delete it and you may reupload when it does work... else we'll remove it, usually permanently. Your https://openuserjs.org/garage/Help_making_ruffle_to_work should be sufficient to reference what you need back when you do figure it out. Because you are in the proverbial basket right before the chopping block and I'm the executioner of it... if I don't feel that you are responding in a timely manner I'll take the necessary action. As I mentioned before you've been given extra opportunity to correct this.

An example page could be this https://randomfoo.net/oscon/2002/lessig/free.html

That would be a nice addition to the "Edit Script Info" page as well as a @match provided it's going to be around for a long time.

The following code...

  • Have you tried removing the @require since it appears to be duplicate code from when I started this issue? i.e. manually inject but not twice.
  • Have you tried forcing load at the load event or DOMContentLoaded event?
  • Some .user.js engines also may have a specific metadata block key that controls when a script gets injected. Usually it's @run-at ¹ ² ³ but can be affected by other engines such as Tampermonkey using @sandbox but I previously mentioned controlling it forced for possible better global compatibility.
  • Have you confirmed that you don't have a "running too quickly issue"? i.e. even though it's not preferred there is setTimeout to check at last case analysis... but usually preferred is some MutationObserver.
  • Something else...

OUJS Admin

I have updated the script.

  1. The scripts checks for SWF elements;
  2. Once an SWF element has been detected, a bar would show up;
  3. Once the bar is clicked upon, the script would load Ruffle (from CDN).

Important: The script still applied to any page. See // @match file:///* and // @match *://*/*.

I hope it is approvable.

Re: @sjehuda:

I hope it is approvable.

Under https://openuserjs.org/scripts/sjehuda/Flash_Player_(ruffle)#enable-support-for-flash-files you should put something like you just wrote with the "every page" addition to number 1:

  1. The scripts checks for SWF elements on every web page;
  2. Once an SWF element has been detected, a bar would show up;
  3. Once the bar is clicked upon, the script would load Ruffle (from CDN).

Nicely done on part 3 btw.

You should also put an example test url (which you provided above) but on the main page of the script saying something like "Try it at ...".

If you let the user what is going to happen and what to do to test it then I can clear the flag and this will be relisted.

Please remember that you are the Author and they may not fully know much about JavaScript so in plain language lay out what your script does. If they do know JavaScript they could be ready to evaluate the script as well after trying to get it to work... but if someone doesn't know what it does (a starting point) then they'll just skip you or down vote because it won't work for them since you didn't provide a "Unit Test" URL.

OUJS Admin

P.S. It works for me under current Firefox with the example URL. I still have the issue of my distro's Falkon being too old compared to yours and snap (with the newer one) doesn't include GreaseMonkey (i.e. they crippled it). So testing in Falkon probably won't occur for me.

Misc note: You are welcome to use instead of the eagle Unicode character (use width and height attribute on a html img tag to do this). This is a permanent member of our GH CDN of images because of the about page we provide for Falkon.

OUJS Admin

Please see changes. Warning note has not been changed.

Nicely done on part 3 btw.

Thank you for this comment. It is important for me to receive such comments.

Misc note

Done.

I did it before, and I have even commented that previous code. I have changed it to a unicode character because I did not want people to be connected to a third-party domain.

### <!-- img src="https://raw.githubusercontent.com/KDE/falkon/master/logo.png" height="30" alt="Falkon" title="Download Falkon Browser"/ --> 🦅 Designed for <span style='color:MediumPurple'>[Falkon](https://www.falkon.org/) web browser</span><!-- ![Falkon Web Browser](https://raw.githubusercontent.com/KDE/falkon/master/logo.png "Falkon Web Browser") -->

I see that the script is not flagged.

May I remove the following text?

# WIP : THIS SCRIPT DOES NOT WORK!
# See [Help making ruffle to work](https://openuserjs.org/garage/Help_making_ruffle_to_work)

Re: @sjehuda:

May I remove the following text?

I've already commented on this above. What you do with informing your users is yours to address.

I've also discovered that my distro's snap is seriously out of date for Falkon. Using the flatpak now which includes the GreaseMonkey extension. Updated our target Falkon about page to reflect this. Yes your script works on Falkon 24.02.1 here.

OUJS Admin