mefiscripts github repository November 18, 2017 8:28 AM   Subscribe

Mefites use a bunch of userscripts, stylesheets, and bookmarklets to customize the site, but we don't have a place to collaboratively maintain them. What if we had a shared Github organization where authors could contribute their scripts for community maintenance? I've put one up over at github.com/mefiscripts/mefiscripts, and if folks think it's a good idea I'd love to have you join.

This is inspired by the recent meta on switching to https, which means a number of scripts will have to be updated.

The idea is to run it very much like the mefiwiki scripts page:
  • No official mod endorsement of the platform or its contents, and hopefully no additional burden on the mods.
  • Authors have to opt in to have their scripts hosted.
  • Once they do, any active Mefite can join the Github organization and help to maintain the code.
If you check out the readme, you can see there are some concerns I'm trying to balance here:
  • Code review: the repo is set up so authors can't push directly to master -- you have to send a pull request and have someone else accept it. I don't want much ceremony around that, just a sense that there's a quick sanity check happening. (Downside: this could be annoying for authors who are used to hosting their own stuff, and if we don't end up with quick and easy approval I'll probably change it.)
  • Generous commit privileges: as a flip side of the previous point, I'm planning to give anyone who asks, and isn't obviously sketchy, permission to review and accept pull requests. (Downside: trust in the kindness of strangers.)
  • Authorial permission: we'll only include existing scripts that were published under an open license (if there are any?), or where the original author says it's OK. (Downside: this will end up excluding some scripts where the original author has moved on, even if context suggests they wouldn't much care.)
  • Open license: contributions will be licensed under the MIT open source license, so if this stops working for whatever reason, the work isn't orphaned and other folks are clearly allowed to pick up the torch.
  • No extensions for now: I think it makes sense to include userscripts, stylesheets, and bookmarklets, but not extensions yet. Extensions have to be officially published in the browser app stores under someone's account, and I'm not sure how to handle that so everyone feels good about it yet.
If you have thoughts about ways to do all this stuff better, please share! And (assuming it's not a totally bad idea), jump in and get involved: send me a Memail with your github handle to be added as a committer; send a pull request to contribute scripts (with permission); or file an issue if you'd like help importing scripts or fixing issues with scripts that are already there.
posted by john hadron collider to MetaFilter-Related at 8:28 AM (31 comments total) 24 users marked this as a favorite

I Endorse This Notion
posted by cortex (staff) at 10:10 AM on November 18, 2017 [1 favorite]


This is a good thing. Thanks!
posted by rhizome at 1:04 PM on November 18, 2017


Great idea.
posted by COD at 1:38 PM on November 18, 2017


Brilliant! Thanks for taking the lead.
posted by Frayed Knot at 1:58 PM on November 18, 2017


Nice!
posted by not_the_water at 4:20 PM on November 18, 2017


I too think this is good. Let me know if I can help.
posted by jeffamaphone at 11:17 AM on November 19, 2017


I'm very interested in participating in this and sent you a memail. I hope we can get a fair percentage of well-loved scripts under version control and active maintenance. (while respecting the rights and desires of the original code authors, of course.)
posted by double block and bleed at 3:49 AM on November 20, 2017


Anyone wanna tweak Plutor's deleted thread greasemonkey script to work with the new Firefox? *bats eyelashes*
posted by Melismata at 8:26 AM on November 20, 2017


I'm glad people are into this! Some updates:

Six of us have joined the org and can review pull requests. Some people aren't sure about their Javascript skills, but please don't feel shy about jumping in -- the more the merrier.

Jessamyn sent in the first script! It's an adaptation of Plutor's script to vague-ify favorite counts. Babblesort pulled it in. I've also sent a pull request to make it directly installable from Github.

I filed an issue looking for someone to work on updating the deleted thread script.
posted by john hadron collider at 10:10 AM on November 20, 2017 [2 favorites]


Thanks for setting this up john hadron collider. I've approved and merged a couple pull requests now. It felt a little odd for me at first since it wasn't my initiative to create the repo but then I decided that if it's going to work out as a community run GitHub organization then I might as well tear off the band-aid and get things rolling.
posted by Babblesort at 1:06 PM on November 20, 2017


Thanks to john hadron collider for pinging me about this. I've let my scripts really decay this...... decade... thanks to being more busy with work and family than I used to be. For the record: I heartily endorse this project. In fact, I'm slightly jealous I didn't think of it myself. All of my scripts are released with an MIT license (or at least that's what I meant to do), meaning anyone can do anything with them they want.

I had put all of my scripts on Gitorious at some point, which is now dead, and the read-only mirror doesn't seem to have them. I'll have to do some digging and see where I might have an archive of the last "officially released" versions of my sciripts.
posted by Plutor at 5:51 PM on November 20, 2017 [4 favorites]


Yeah Plutor, it seems like the deleted threads one has two public versions, one with a later "last updated" comment and store.js, and one with earlier-dated comments but with localStorage and polyfill getter and setter methods.
posted by rhizome at 6:15 PM on November 20, 2017


Hi Plutor! I love your scripts and feel a bit lost browsing MeFi without them. Thank you so much for creating them.

I would love to participate. Apparently one of my favorite things to do is work with MeFi scripts (seriously -- time just vanishes because I always love working with them or learning about them, even though most of them are out of my depth/know-how). I am not a programmer and all the stuff I've made / worked on to fix was basically done through research and trial and error.

Job stuff has been crazy, so recently my MeFi time has been a lot more limited that I would like. i.e. I'm declaring my interest, but the challenge for me will be finding the time here and there to spend on this.

I can contribute my own stuff; speaking of Plutor's scripts, I have edited/customized versions of the following (all compatible with https):

- MeFi Deleted Posts - should work with Chrome / older FF; I was trying to fix it last weekend for FF 57.

- MeFi Quote - Works for me in FF 57.

- MeFi Scroll Tag - I used a version that didn't depend on cookies; was trying to fix it also for FF 57 but it worked beautifully for me before the update so theoretically it should also work in Chrome).

I can contribute the above when I've had a chance to verify whether they work as expected (and also test them with all themes) and document the custom changes I made. I use/used them all personally with MeFi Modern Dark.

Thanks for getting this organized, john hadron collider!
posted by rangefinder 1.4 at 12:47 AM on November 22, 2017


MeFi Quote - Works for me in FF 57.

Didn't get a chance to try it pre-HTTPS, as I was on a Brave kick, but I switched back to Quantum and it wasn't working then. Tried to fix it, but, I am so far from being a coder the light from being a coder won't reach me for a million years...

So, if you COULD upload it, that'd be greaaaaaaat. Thanks.
posted by Samizdata at 5:50 PM on November 26, 2017


Also, maybe the easy MeFimail script? I have made a bloody great dog's breakfast of making that work too.
posted by Samizdata at 5:52 PM on November 26, 2017


Thanks for this, and thank you to all the scripters and coders!

In addition to scripts, there are bookmarklets, mentioned in the OP and there's a bookmarklet folder on the mefiscripts github repository, but no link to the MeFi Wiki page yet.
posted by filthy light thief at 7:12 AM on November 27, 2017


I started a bunch of work on mefi navigator awhile ago. If it ends up on the repository, I'll do a pull and see about actually, you know, finishing what I started. I have no idea why the script author's name always escapes me. Does not seem promising for my code, does it?
posted by maxwelton at 6:57 PM on November 27, 2017


Heads up on some Firefox issues:
* there's currently a Firefox bug keeping user scripts from loading from Github. We could use rawgit as an intermediary - here's an example - but that requires trusting someone other than Github, and we should probably talk before doing that.
* Firefox 57, released on 2017-11-14, required a Greasemonkey rewrite. There are some quick notes for developers on the upgrade.
posted by Pronoiac at 10:56 PM on November 28, 2017


Some requests from another thread about Metafilter Scroll Tag:
* Deleted Posts - rangefinder 1.4, you have a somewhat working version?
* MultiFavorited Multiwidth
* New Posts - Comments

Separately, while I think I've fixed Scroll Tag, and I'll send a pull request, I could only get it working in Tampermonkey, and not Greasemonkey. So I'm glad to hear gilrain prefers Tampermonkey. :)
posted by Pronoiac at 6:38 PM on November 29, 2017


Re: "New Posts - Comments", that's using some endpoints that are currently not working, and the frimble-signal has been deployed.
posted by Pronoiac at 2:18 PM on November 30, 2017


I updated MultiFavorited Multiwidth, and sent a pull request.
posted by Pronoiac at 3:01 PM on November 30, 2017 [2 favorites]


Life is even more miserable now Deleted Posts works no more.
posted by Mister Bijou at 2:29 AM on December 1, 2017 [1 favorite]


MULTIFAVORITED MULTIWIDTH WORKS NOW I AM SO HAPPY!!
posted by Melismata at 11:51 AM on December 1, 2017


I don't remember the "New Posts - Comments" script. What does it do/where's the source?
posted by urbanwhaleshark at 4:26 PM on December 1, 2017


Pronoiac: yes I can contribute a working version of the Deleted Posts script (works with Tampermonkey/Greasemonkey 3).

Samizdata: I'll add the MeFi Quote script too (works with Greasemonkey 4 and Tampermonkey but only in the Modern themes).

Just asked for access to the repo and I'll add when I next have a chance (hopefully this weekend).
posted by rangefinder 1.4 at 2:57 AM on December 2, 2017 [1 favorite]


urbanwhaleshark: I don't remember the "New Posts - Comments" script. What does it do/where's the source?

There was a 2016 post about it, and here's the script. It hits endpoints like https://www.metafilter.com/newcount.mefi, and that's currently showing 0 posts and comments.


It might be nice to have commit access. I've been ok without it, using forks and pull requests.
posted by Pronoiac at 7:20 PM on December 2, 2017 [1 favorite]


I sent a deleted posts pull request, so it looks like there's at least a couple. I didn't see others were also going to be working on other versions.
posted by rhizome at 9:29 PM on December 2, 2017


rhizome: No worries - the Deleted Posts script I have is a custom restyled version I've been using for a while - I just needed time to test it outside of FF and document the changes (which I've done now, and also sent a pull request). If your version works too, I don't see why we can't have two versions available for people to try.
posted by rangefinder 1.4 at 12:23 AM on December 3, 2017


Life is even more miserable now Deleted Posts works no more.

Oh, joy!

New!

Unofficial Metafilter web extension to show deleted posts.

Thanks, urbanwhaleshark
posted by Mister Bijou at 1:15 AM on December 3, 2017 [1 favorite]


I sent a deleted posts pull request, so it looks like there's at least a couple. I didn't see others were also going to be working on other versions.

I should probably address this.

I've rewritten a number of scripts into extensions. These were GM scripts that I used on a daily basis that no longer worked with FFQ and prior to the GM developers completing a compatible version in time for the mid-November deadline. I didn't write them to replace the GM userscripts. I think the scripts and extensions can co-exist quite happily and serve two different sets of users - those that like the functionality that GM provides as a "host" for scripts for any number of sites, and those that um don't. I also enjoy coding.

On a personal note I'd like to thank the people that wrote the original scripts that I copied. I wouldn't have written the extensions if it wasn't for their hard work conceiving the ideas and writing the code in the first place.

On the extensions themselves: because they're written for modern browsers it means that they can take advantage of the huge changes in JavaScript/web standards that have occurred over the last few years. This means code can be written more concisely and securely - there are fewer gotchas of which you need to be mindful when coding which makes life a lot easier.

That's it. Hope you enjoy them if you use them. They're all open-source/public license. Feel free to steal from them as much as you like.
posted by urbanwhaleshark at 6:23 AM on December 3, 2017


Oh, before I forget: I design for the classic theme only because I'm rather lazy, so if there are any issues with the extensions on the new theme, let me know.
posted by urbanwhaleshark at 6:27 AM on December 3, 2017


« Older Secret Quonsar thank you thread (2017)   |   The Great Metafilter Cookie Swap 2017: sign up... Newer »

You are not logged in, either login or create an account to post comments