Repository navigation
Linx Amender Rules Thread #1
Description
Activity
[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}[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}[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}Thank you :) I updated the list
[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
You are welcome. Glad you got it working and thanks for sharing :)
updated post: [generic] convert embed youtube video to iframe
script will support more embed codeUpdated ages ago just forgot to reply. Thanks.
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}Thanks :)
[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}Thanks you
[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}Thanks :)
10 remaining items
@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}thanks for that!
just got around to trying it now - also learning more stuff from your examples :)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.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?
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!
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.
OK, sounds good. Keep up the good work!
Updated License
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)?
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.
Ok, thanks for the update. Below is the URL/REGEX I'd like to be added:
^https://archive.org/details/\@.*done
Thanks!
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.