sjehuda Author



Please unlist this userscript until it is resolved.

Currently, it does not work as I want it to work.

Once it works as expected, I will ask for listing it again.

Thank you.


Anyone, including management can see your own issues are on your script... very rarely do you need to bug the general public forums.

Pardon for posting it publicly. I did this before I noticed the issue discussion for this userscript.

Could it be that I do not receive notifications?

Also, I did not find notification options under preferences.


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?


Done!

The userscript, now, has an option to select a type of online handler and also an instance.

The parameters are:

  • handler for type of online handler.
  • instance for URL.

The URL for CommaFeed is https://${instance}/rest/feed/subscribe?url=${location.href} though we might not want to bound people to a fixed pathname, as they migh have a special setup for pathname, so we either should let people to enter the complete path (i.e. https://news.my.instance/rest/feed/subscribe?url= or add a custom field for people who use gemini:// gopher:// or just plain http://.


Greetings Steve!

Please pardon for the belated respond!

I have posted a question at CommaFeed.

Please help if you can.




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

Thank you for any help!


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)





Greetings!

I have two userscripts to play SWF files.

One is
https://openuserjs.org/scripts/sjehuda/Flash_Player_(swf2js)

The other is
https://openuserjs.org/scripts/sjehuda/Flash_Player_(ruffle)

Would it be appropriate to merge these two into one?
If so, would a menu be a good solution?

Menu:

  1. Use ruffle
  2. Use swf2js
  3. Prefer ruffle
  4. Prefer swf2js

The "Use" menus would exclusively utilize the selected player.
The "Prefer" menus will choose a player over the other, but I do not know how to make a switch.

Please advise.


Admins, please kindly change the title to:

Same userscript: 3 variants of 3 interfaces

I beg your pardon on this petty matter.


Greetings to one and all!

I have made three Userscripts called "Switch Page Direction".
See https://openuserjs.org/group/rtl

These userscripts have exactly the same functionality.

Each has a different interface:

  1. Monkey menu
  2. Context menu
  3. Hotkey

Yet, I want to make them into one or at least two.

I think that it would be reasonable to merge 1 (monkey menu) and 3 (hotkey).

Please advise.


Replace raster graphics (bitmap-based) buttons by scalable HTML (CSS or SVG or both) buttons.

This would also be advantageous, because:

  • The proposed HTML buttons can have custom tags <junkblocker></junkblocker>; and
  • Such tags will not be subjected to changes forced on host page by its styling rules (namely img { /* styling rules */}).

Script has been updated (copy of version 2.7) with the following metablocks:

- // @version     2.1
+ // @version     2.6 <-- this is intentional
+ // @homepageURL https://openuserjs.org/scripts/junkblocker/RSS+Atom_Feed_Subscribe_Button_Generator
+ // @supportURL  https://openuserjs.org/scripts/junkblocker/RSS+Atom_Feed_Subscribe_Button_Generator/source
+ // @updateURL   https://openuserjs.org/meta/junkblocker/RSS+Atom_Feed_Subscribe_Button_Generator.meta.js
// @downloadURL  https://openuserjs.org/install/junkblocker/RSS+Atom_Feed_Subscribe_Button_Generator.user.js

@junkblocker
Please update your version to 2.7.

@Marti
Is it possible to hide page from search and profile?
Is it also possible to reset installs number? (5415)


I have contacted the original author of RSS+Atom_Feed_Subscribe_Button_Generator and asked him to maintain a version at OUJS too. He agreed.

May the admins kindly make the transfer or should we handle it on our own?

Of course, I assume that we would have to keep some paths (not the page) for Userscript manager software to make the required updates.



Solved by:

function setNonceUponCSP() {
  window.addEventListener("securitypolicyviolation", (e) => {
    //let message = e.originalPolicy;
    //messageTruncated = message.substring(message.indexOf("'nonce-") + 7);
    //let nonceValue = messageTruncated.substring(0, messageTruncated.indexOf("'"));
    let nonceValue = e.originalPolicy.match(/'nonce-(.*?)'/)[1];
    cssStylesheet = document.getElementById(namespace);
    cssStylesheet.setAttribute('nonce', nonceValue);
  }, { passive : true, });
}

I didn't find a way to make it to work on first error.


Solved by:

function setNonceUponCSP() {
  window.addEventListener("securitypolicyviolation", (e) => {
    //let message = e.originalPolicy;
    //messageTruncated = message.substring(message.indexOf("'nonce-") + 7);
    //let nonceValue = messageTruncated.substring(0, messageTruncated.indexOf("'"));
    let nonceValue = e.originalPolicy.match(/'nonce-(.*?)'/)[1];
    cssStylesheet = document.getElementById(namespace);
    cssStylesheet.setAttribute('nonce', nonceValue);
  }, { passive : true, });
}

I didn't find a way to make it to work on first error.


Plan cancelled.

Thos program, now, takes the content, regardless of content-type header, and determines whether data is feed or is not.


GM.xmlHttpRequest (incorporated into Promise)

gmXmlhttpRequest({
  method: 'GET',
  url: document.documentURI,
  headers: {
    "Content-Type": "text/plain",
    "Accept": "text/plain"
  },
  onprogress: function(request) {
    request.responseType = 'text';
  },
  onload: function(request) {
    request.overrideMimeType = 'text/plain';
    if (document.URL.startsWith('file:') ||
        request.status == 200) {
      myResolve(request);
    }
    else {
      myReject("File not Found");
    }
  },
  onerror: function(request) {
    console.log('Error Error Error')
  }
})

Failed.