Skip to content

Linx Amender Rules Thread #1

Description

@TimidScript

Post your exported rule suggestion here.

Script and Title rules are not allowed.
Unless you have some amazing style, CSS rules would most likely be rejected.

Activity

  1. atomGit commented on Mar 19, 2015

    @atomGit

    [beforeitsnews.com] remove external link redirects

    {"id":"L1426704260084","name":"[beforeitsnews.com] remove external link redirects","URLs":"@http://beforeitsnews.com/","description":"remove external link redirects","sampleURL":"http://beforeitsnews.com/","nthNode":"0","type":1,"selectors":"a","regexes":[{"name":"href","search":"/r2/\\?url="}],"enabled":true,"timestamp":1426792784491}

  2. atomGit commented on Mar 19, 2015

    @atomGit

    [morguefile.com] remove image overlay

    {"id":"L1424377335073","name":"[morguefile.com] - remove image overlay","URLs":"@http://www.morguefile.com/\n@https://www.morguefile.com/","description":"remove social sharing overlay when previewing images","sampleURL":"http://www.morguefile.com/archive","nthNode":"0","type":1,"selectors":"div#imgAreaShare","regexes":[{"name":"-id","search":"imgAreaShare"}],"enabled":true,"timestamp":1426793654004}

  3. atomGit commented on Mar 19, 2015

    @atomGit

    [generic] remove tracking params from URL's

    {"id":"L1418997894597","name":"[generic] Remove tracking params from URLs","URLs":"*","description":"remove link tracking parameters from URL's - idea from: https://addons.mozilla.org/en-US/firefox/addon/pure-url/","nthNode":"0","type":1,"selectors":"a","regexes":[{"name":"href","search":"(&|%26|\\?)(?:utm_|ga_|_openstat|yclid|fb_|action_object_map|action_type_map|action_ref_map|hc_location).+?(?=&|%26|$)","replace":"$1"},{"name":"-ping"}],"enabled":true,"timestamp":1426793875264}

  4. TimidScript commented on Mar 21, 2015

    @TimidScript
    OwnerAuthor

    Thank you :) I updated the list

  5. atomGit commented on May 11, 2015

    @atomGit

    [generic] convert embed youtube video to iframe so video is playable without Adobe Flash (browser must support HTML5 video)

    thanks for your help with this Timid!
    this is not heavily tested

    {"id":"L1430836041895","name":"[generic] convert embed youtube video to iframe","URLs":"*","description":"Convert video embed code to iframe so it is playable without Adobe Flash Player (browser must support HTML5 video)","nthNode":"0","type":1,"selectors":"embed","regexes":[{"name":"=outerHTML","search":"<embed.+?src=\"(https?://www\\.youtube\\.com)/v/(\\S+?)[?\"].+?height=\"(\\d+).+?width=\"(\\d+)","replace":"<iframe src=\"$1/embed/$2?feature=oembed\" height=\"$3\" allowfullscreen=\"\" frameborder=\"0\" width=\"$4\"></iframe>"}],"enabled":true,"timestamp":1431947231578}

    UPDATE: 18-MAY-2015 - better support of embed code

  6. TimidScript commented on May 12, 2015

    @TimidScript
    OwnerAuthor

    You are welcome. Glad you got it working and thanks for sharing :)

  7. atomGit commented on May 18, 2015

    @atomGit

    updated post: [generic] convert embed youtube video to iframe
    script will support more embed code

  8. TimidScript commented on Jun 10, 2015

    @TimidScript
    OwnerAuthor

    Updated ages ago just forgot to reply. Thanks.

  9. atomGit commented on Jun 14, 2015

    @atomGit

    UPDATE - small error corrected: [generic] convert embed youtube video to iframe so video is playable without Adobe Flash (browser must support HTML5 video)

    {"id":"L1430836041895","name":"[generic] convert embed youtube video to iframe","URLs":"*","description":"Convert video embed code to iframe so it is playable without Adobe Flash Player (browser must support HTML5 video)","nthNode":"0","type":1,"selectors":"embed","regexes":[{"name":"=outerHTML","search":"<embed.+?src=\"(https?://www\\.youtube\\.com)/v/(\\S+?)[?\"].+?height=\"(\\d+).+?width=\"(\\d+).*?\">(</embed>)?","replace":"<iframe src=\"$1/embed/$2?feature=oembed\" allowfullscreen=\"\" frameborder=\"0\" height=\"$3\" width=\"$4\"></iframe>"}],"enabled":true,"timestamp":1434281736574}

  10. TimidScript commented on Jun 14, 2015

    @TimidScript
    OwnerAuthor

    Thanks :)

  11. atomGit commented on Jun 24, 2015

    @atomGit

    [generic] convert embed youtube video to iframe so video is playable without Adobe Flash (browser must support HTML5 video)

    UPDATE: supports more embed methods

    {"id":"L1430836041895","name":"[generic] convert embed youtube video to iframe","URLs":"*","description":"Convert video embed code to iframe so it is playable without Adobe Flash Player (browser must support HTML5 video)","nthNode":"0","type":1,"selectors":"embed","regexes":[{"name":"=outerHTML","search":"(?:<object.+?)?<embed.+?src=\"((?:https?:)?\\/\\/www\\.youtube\\.com)\\/v\\/(\\S+?)[?\"].+?height=\"(\\d+).+?width=\"(\\d+).*?\">(?:<\\/embed>|<\\/object>)?","replace":"<iframe src=\"$1/embed/$2?feature=oembed\" allowfullscreen=\"\" frameborder=\"0\" height=\"$3\" width=\"$4\"></iframe>"}],"enabled":true,"timestamp":1435170781176}

  12. TimidScript commented on Jun 25, 2015

    @TimidScript
    OwnerAuthor

    Thanks you

  13. atomGit commented on Jun 28, 2015

    @atomGit

    [generic] convert embed youtube video to iframe so video is playable without Adobe Flash (browser must support HTML5 video)

    UPDATE: revised expressions so attribute order isn't as important (thanks Timid)

    RegEx: https://www.regex101.com/r/sQ0gJ1/1

    {"id":"L1430836041895","name":"[generic] convert embed youtube video to iframe","URLs":"*","description":"Convert video embed code to iframe so it is playable without Adobe Flash Player (browser must support HTML5 video)","nthNode":"0","type":1,"selectors":"embed","regexes":[{"name":"=outerHTML","search":"(?:<object.+?)?<embed.+?src=\"((?:https?:)?\\/\\/www\\.youtube\\.com)\\/v\\/(\\S+?)[?\"].+?((?:width|height)=\".*?\").*?((?:width|height)=\".*?\")>(?:<\\/embed>|<\\/object>)?","replace":"<iframe src=\"$1/embed/$2?feature=oembed\" allowfullscreen=\"\" frameborder=\"0\" $3 $4></iframe>"}],"enabled":true,"timestamp":1435452037960}

  14. TimidScript commented on Jun 30, 2015

    @TimidScript
    OwnerAuthor

    Thanks :)

  15. 10 remaining items

  16. TimidScript commented on Jul 8, 2015

    @TimidScript
    OwnerAuthor

    @atomGit
    Below is code for direct outgoing links for Mozilla that you requested ages ago.

    {"id":"L1415990867358","name":"Mozilla: Direct Outgoing Links","URLs":"@addons.mozilla.org","sampleURL":"https://addons.mozilla.org/en-US/firefox/addon/session-manager/","nthNode":"0","script":"(function ()\n{\n console.warn(\"TSLA Rule: Removing outgoing tracking by making clones.\");\n var links = document.querySelectorAll(\".support, .home, #addon-description a\");\n for (var i = 0; i < links.length; i++)\n { \n link = links[i].cloneNode(true);\n link.setAttribute(\"style\", \"background-color: #FBFFCC;\");\n links[i].parentElement.insertBefore(link, links[i]);\n links[i].parentElement.removeChild(links[i]);\n }\n console.warn(\"Cleaned links are highlighted in light blue\");\n})();","type":5,"selectors":"a","regexes":[],"enabled":true,"timestamp":1436260106887}

  17. atomGit commented on Jul 10, 2015

    @atomGit

    thanks for that!
    just got around to trying it now - also learning more stuff from your examples :)

  18. pegzmasta commented on Mar 30, 2016

    @pegzmasta

    Since Linx Amender relies on a Free Software browser add-on known as Greasemonkey, in the spirit of freedom: Can you change the license to a free/libre license, so that I can recommend Linx Amender as a solution to the users of the Internet Archive? That way, IA users will be able to solve the forum problem using your amazing script and the rule below.

    Creative Commons BY-NC-SA conflicts with Freedom 3, the ability to redistribute a copy at a price or gratis. Also, GitHub contains a link that recommends against using Creative Commons for software, titled: My project isn't software. GitHub maintains a license page to allow users to choose the license that best suits their work; I suggest choosing one of these licenses in order to eliminate confusion. I mainly bring this up, because I've learned that The JavaScript Trap is a real threat to online computing, and that it is ethical to grant users the freedom to have control of the software that runs on their computers. Thanks in advance for your consideration and hard work!


    [archive.org] Fix Forum Links

    {"id":"L1459362029321","name":"[archive.org] Fix Forum Links","URLs":"^https://archive.org/post/.*\n^https://archive.org/details/\@.*\n@https://archive.org/iathreads/forums.php\n^https://archive.org/iathreads/forum-display.php.*\n^https://archive.org/search.php\\?query=forumPost.*\n^https://archive.org/iathreads/posts-display-new.php.*","description":"1. Replace obsolete \"hash/anchors\" on any forum page\n2. Restore the link to the Wayback Machine Forum","sampleURL":"https://archive.org/iathreads/forums.php","nthNode":"0","type":1,"selectors":"a","regexes":[{"name":"href","search":"(.*\\/details\\/.*)(#forum)(.*)","replace":"$1&tab=forum$3"},{"name":"href","search":"web.php","replace":"hardware.php"}],"enabled":true,"timestamp":1459458633908}

    EDIT:
    I added one more URL to the rule.

    EDIT:
    Added another URL to the rule.

  19. TimidScript commented on Mar 31, 2016

    @TimidScript
    OwnerAuthor

    Hello,

    I see the issue. They are a company. For personal usage however, I see no problem for most users. I really do not like the idea of people charging others for free software and that's why I went fot he CC license. They are a lot of scrupleless people in our world and a lot of easy targets.

    You are right. Would GPLv3 be acceptable? They can pretty much get away with anything, plus they are forced to carry on the GPLv3 license. Would that be acceptable to IA users?

  20. pegzmasta commented on Mar 31, 2016

    @pegzmasta

    Yes, GPLv3 is an excellent choice! This type of license protects against technical measures being added into modified versions (like DRM), and will also ensure that proprietary versions are never made (my favourite part). After choosing one of these licenses, you would also have to delete All Rights Reserved from the Copyright Notice, or replace it with Some Rights Reserved (Creative Commons suggests this is OK). I understand what you mean about scrupleless people; syzygos brought this into perspective when he posted on IA that someone was selling free texts from archive.org. Let me know what you decide, and when you think the change can be made [on GitHub and on OpenUserJS]. Thanks!

  21. TimidScript commented on Mar 31, 2016

    @TimidScript
    OwnerAuthor

    GPLv3 it is, with a side note of notification if re-distributing. I will try and update all my scripts this weekend.

    posted on IA that someone was selling free texts from archive.org

    Ouch. So cheap that you wouldn't think twice about purchasing if you wanted it. For me the most infamous is Blender re-branding. The fraudsters must be making good money, because they've been at it for years.

    I have no worries of my scripts being abused like that. Just the principle of the matter, that's all.

  22. pegzmasta commented on Apr 1, 2016

    @pegzmasta

    OK, sounds good. Keep up the good work!

  23. TimidScript commented on Apr 3, 2016

    @TimidScript
    OwnerAuthor

    Updated License

  24. pegzmasta commented on Apr 3, 2016

    @pegzmasta

    Wow! Thanks so much; I also like the way Lynx Amender notifies users when it has been updated. Can you also edit the information on Greasy Fork, as well (the Version and License)? Also, I just added another URL to the rule above; can you update it (this should be the last one)?

  25. TimidScript commented on Apr 3, 2016

    @TimidScript
    OwnerAuthor

    You are welcome.
    NP. This thread is about adding useful rules. When I can be bothered to finish LA4, this thread will be dead and you will be able to share your own personal rules with the world or to certain individuals through online synchronization and sharing.

    The rule you pasted json format is broken. Try and paste it again below. Or just give me the URL you want to include and I will add it manually.

  26. pegzmasta commented on Apr 3, 2016

    @pegzmasta

    Ok, thanks for the update. Below is the URL/REGEX I'd like to be added:

    ^https://archive.org/details/\@.*

  27. TimidScript commented on Apr 7, 2016

    @TimidScript
    OwnerAuthor

    done

  28. pegzmasta commented on Apr 7, 2016

    @pegzmasta

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions