Skip to content

Instantly share code, notes, and snippets.

@sizzlemctwizzle
Last active December 27, 2015 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sizzlemctwizzle/7314743 to your computer and use it in GitHub Desktop.
Save sizzlemctwizzle/7314743 to your computer and use it in GitHub Desktop.
<sizzlemctwizzle> So the first question is what language/platform should we use?
<CletusC> Node.js IMO--we are a JS community so we may as well build on what we all know
<JoeSimmons> I'm really not too experience with the server-side aspect of things. Although I could learn
<JoeSimmons> Node.js would allow me to use what I basically already know though, right? (besides learning the API)
<CletusC> Node scales up really well and would probably eliminate one of the main issues of USO--the load. Obviously down the line, but thinking ahead here
<sizzlemctwizzle> Yup exactly what I was thinking. I makes easy for intreped people to add new features to the site and not have to hack them in with user scripts like we currently do.
<sizzlemctwizzle> Correct Joe.
<JoeSimmons> Cool
<JoeSimmons> I'm great at JS so if I learn Node then great
<JoeSimmons> Btw, I have a headache, so if anything I say sounds a little off, it's a combination of being tired and that :p
<sizzlemctwizzle> I recently upload a branch of my website that does interesting stuff like: mess with the file system, simple authentication, routing, and handling post data.
<sizzlemctwizzle> https://github.com/sizzlemctwizzle/sizzlemctwizzle.com/tree/Watched
<JoeSimmons> So would Node allow us to do all we want to do?
<CletusC> Most of the stuff we are probably looking to do, JS-wise, might already be an npm module
<sizzlemctwizzle> this is true. there are tons of modules already built.
<JoeSimmons> Hmm
<CletusC> https://npmjs.org/
<sizzlemctwizzle> We'd basically be customizing and gluing stuff together.
<sizzlemctwizzle> I use Express. It basically gives you a working web server with very little effort
<sizzlemctwizzle> Express is one of those modules Cletus is talking about.
<JoeSimmons> Yea
<JoeSimmons> Like I said, I haven't too much experience in back-end, but I could learn whatever we decide to go with
<CletusC> Could probably use underscore.js as well, which would bring in a lot of helper functions. underscore.js is to node as jquery was to the web
<CletusC> That's really only if needed though
<sizzlemctwizzle> There's also loadash: http://lodash.com/
<JoeSimmons> Looks nice
<sizzlemctwizzle> Anyway, I think it might be a good idea to use pure js on the server.
<CletusC> Yeah, probably. I don't think we'd be working with anything too complex
<sizzlemctwizzle> we could use one of those libraries if needed but it might be a barrier of entry for others to contribute.
<sizzlemctwizzle> This is exactly the reason why I want to us Mustache for templating
<CletusC> In regards to templating--Mustache or Handlebars is the ideal
<CletusC> Just pass in an object and reference in standard dot-notation
<sizzlemctwizzle> I vote Mustache until there's something that Mustache can't do for us.
<sizzlemctwizzle> Handlebars is afterall backwards compatible with Mustache
<CletusC> Agreed
<sizzlemctwizzle> Now what the hell are we going to use on the client side?
<sizzlemctwizzle> jQuery? Angular.js?
<sizzlemctwizzle> Handlebars?
<sizzlemctwizzle> underscore?
<sizzlemctwizzle> pure JS?
<JoeSimmons> I only have experience with jQuery (and not even from using it... LOL. From building a library similar to it)
<JoeSimmons> librarily speaking :p
<sizzlemctwizzle> jQuery is really popular so it might help draw developers.
<JoeSimmons> True
<JoeSimmons> StackOverflow... jeez.
<CletusC> I'd go with jQuery, but emphasis on pure JS idioms
<JoeSimmons> So many jQuery lovers
<CletusC> Cache the variables if needed, stuff like that
<JoeSimmons> For sure
<sizzlemctwizzle> Yeah, don't rely on the library for everything and forget about performance.
<JoeSimmons> I'm a freak for performance, as many would know
<CletusC> I see chained methods that get confusing 5 chains down that aren't needed--avoid the beginner stuff and build quality.
<JoeSimmons> But performance after everything is finished
<CletusC> I'd only use it in the case of cross-browser stuff. Stuff that might be too new in pure js
<sizzlemctwizzle> Yes you identify your bottlenecks after everthing else is done.
<JoeSimmons> I saw a dude write some jQuery stuff that manipulated some <select> options, and it took literally 15 seconds to change the option -- it would freeze. I helped him convert it to using purely HTML and CSS only
<sizzlemctwizzle> Yes, I would never use jQuery if it wasn't for cross-browser compatibility.
<sizzlemctwizzle> Just use it for the bare minimum.
<JoeSimmons> I never use any library except if I really, really have to. So I know how to not use libraries
<CletusC> Something like http://modernizr.com/ would help upgrading older browsers and any polyfills if it comes to that
<JoeSimmons> I just created my library for fun. I do end up using it a lot, but I still prefer no library
<sizzlemctwizzle> Me too. It's kind of the problem I had when I started working with node. I wanted to build everything from scratch.
<JoeSimmons> I've always wanted to build from scratch, habit of mine.
<sizzlemctwizzle> I did build from scratch. You can go back in the commit log of my site and see.
<sizzlemctwizzle> lol
<sizzlemctwizzle> But I eventually just gave in to Express and Mustache.
<sizzlemctwizzle> So hosting.
<sizzlemctwizzle> Nodejitsu provides free hosting for open source sites, but I've never used them before.
<sizzlemctwizzle> I'ver heard good things though.
<CletusC> http://nodejitsu.com/ seems to be down right now, but I have heard good things as well
<JoeSimmons> I don't know. I feel useless right now lol
<sizzlemctwizzle> I run my site on an old pentium 4 in my basement for total control, but I doubt that is an option for us.
<JoeSimmons> I feel, not up to date. I used to maintain my own website but that was many years ago and things have changed a lot
<CletusC> Ah, it's back up again. "We offer seamless, full integration with your Github account."
<CletusC> That's nice--continuous deployment
<sizzlemctwizzle> Yes. I too was behind the times recently, but I'm catching back up.
<JoeSimmons> "SQL was designed for SQL injection attacks" lol... Doug
<sizzlemctwizzle> Huh, Cletus?
<CletusC> I like nodejitsu considering it is free for open source.
<CletusC> sizzle, it says continuous deployment--integrates with github
<sizzlemctwizzle> It does. What page is that on?
<CletusC> https://www.nodejitsu.com/documentation/features/webhooks/
<CletusC> Githubs webhooks, but they handle the hook
<sizzlemctwizzle> Awesome.
<sizzlemctwizzle> That's what I was planning to do for users hosting scripts on our site.
<CletusC> Yeah, we could even look into adding a site-specific preconfigured hook by forking that repo in github, but that could be at a later time
<CletusC> by "that repo" I mean github's hooks
<sizzlemctwizzle> Yeah I figured we'd start with the WebHook and then get GitHub to a hook for our site.
<sizzlemctwizzle> *add a hook
<sizzlemctwizzle> So other features?
<sizzlemctwizzle> How close do we want to get to what US.o offers?
<CletusC> Main things to start would be github integration, most likely with a normal script upload
<JoeSimmons> I'd just like to be able to have people host their scripts there, and maybe have a forum, mainly
<sizzlemctwizzle> how about forums on scripts?
<CletusC> I'm not sure how that should be handled. Personally I would prefer an issue tracker of some sort, but I'm not sure the complexity
<JoeSimmons> Yea, some way to have organized comments on them
<sizzlemctwizzle> An issue tracker would probably be more useful that just comments.
<CletusC> Perhaps a real basic one with the option of redirecting if the author chooses (let's say to the github issue tracker)
<CletusC> Issue tracker would combine script forums with the issues tab
<sizzlemctwizzle> Yeah it'd be weird to have issues on our site and other issue on GH
<JoeSimmons> An issue tracker seems fine
<JoeSimmons> I'm a newb with GitHub, so... yeah.
*** Mode #newuserscriptsrepo +oooo JoeSimmons CletusC truckmuddr sizzlemctwizzle by WakiMiko
<sizzlemctwizzle> Yeah I guess, I could see it. Most people would just dump their scripts on GH, and our site would be the user facing portion.
<CletusC> I see the issue tracker as basically a simply forum, with optional configurable tags, opening/closing, and some searching on it
<CletusC> A simplified super basic version of the GH issue tracker, if you will
<sizzlemctwizzle> Yeah that sounds good to me.
<JoeSimmons> Yea
<CletusC> One thing I would like to see as part of the site is markdown support--get rid of HTML posting.
<JoeSimmons> Ah, like SE
<JoeSimmons> SO*
<JoeSimmons> Actually both I think
<sizzlemctwizzle> Yes markdown all the way. That way we don't have to sanitize posts.
<JoeSimmons> Yup
<CletusC> One of the biggest issues I see on the forums is broken malformed html that breaks the forums.
<JoeSimmons> Especially in the form of code block posting
<sizzlemctwizzle> Also we need a live markdown previewer.
<JoeSimmons> Like StackOverflow, too, then
<CletusC> If possible, use github-flavored-markdown, but that's to be discussed.
<CletusC> Let me see if there's an npm module for that
<sizzlemctwizzle> What do you have against regular markdown.
<sizzlemctwizzle> ?
<CletusC> I guess the biggest thing is code highlighting, but if we could auto highlight `pre` tags, I'm game for whatever works
<CletusC> URL autolinking, strikethrough (I'm sure Marti would appreciate) are the only other ones really
<sizzlemctwizzle> Since most code is JS, we can just highlight all code with that.
<sizzlemctwizzle> Yeah, I always wondered why it lacked strikethrough.
<JoeSimmons> Yep, Marti does indeed like that strikethrough
<CletusC> GH uses https://github.com/github/linguist to detect languages and highlight
<CletusC> maybe there is something in JS only that does the same?
<JoeSimmons> I'd be the person to say "let's do it from scratch" but that seems pretty complicated, lol.
<CletusC> http://highlightjs.org/
<sizzlemctwizzle> I think we can just assume JS.
<JoeSimmons> What if they post HTML to go with it, though?
<sizzlemctwizzle> And CSS
<sizzlemctwizzle> Then they're fuck and don't get any higlighting
<JoeSimmons> lmao
<CletusC> That last link is an NPM module as well, fyi
<CletusC> Then again, that should probably be an entirely clientside deal
<sizzlemctwizzle> I'd rather it run on the client side and let them take the hit
<CletusC> Agreed
<JoeSimmons> Yeah
<sizzlemctwizzle> I _know_ we're going to have a working stall count, but are we going to do reviews.
<sizzlemctwizzle> *install count
<CletusC> So a markdown parser, standard is fine, with http://highlightjs.org/ for any highlighting on clientside
<JoeSimmons> Btw when I said HTML, I meant if we do end up having some sort of forum/comment setup and they post a code block of HTML or CSS
<CletusC> I'd say reviews are good, but a standard 5 star vote without having to input anything is ideal IMO
<sizzlemctwizzle> Agree with but I want 10 stars
<CletusC> That works too :P
<JoeSimmons> eh, idk, the text on the reviews is pretty important sometimes
<CletusC> The OPTION to post text, but not a requirement
<JoeSimmons> but a simple [5/10]-star system wouldn't be bad. if people have issues, a review isn't where it should be posted anyway
<sizzlemctwizzle> Yes, US.o makes you say something
<JoeSimmons> Definitely make it an option, if so
<CletusC> I do think, for text reviews, a thumps up or down (helpful or no) would be good, but I don't know if needed
<JoeSimmons> Another question: How do we prevent spammers?
<CletusC> thumbs*
<sizzlemctwizzle> I think reviews are a good way to bitch about a script. I like them.
<JoeSimmons> Should we allow editing of reviews like USO?
<sizzlemctwizzle> Yes.
<JoeSimmons> I agree
<sizzlemctwizzle> Spamming is a whole `nother can of worms.
<CletusC> Proposal, a review per version of the script, similar to Mozilla addons. A "this review was posted about version x.y.z" message or something
<sizzlemctwizzle> Also malicious scripts
<CletusC> Allow editing of the review, but update the version it applied to
<JoeSimmons> Yes, YES
<JoeSimmons> lol
<sizzlemctwizzle> I like that. They're review a specific version of a script so you know if it's relevant.
<JoeSimmons> So many times I have bad reviews sitting on my script back from when YouTube changed and a specific version had a bug, which I fixed but the review remains there
<CletusC> Spamming: whitelist URLs that can be posted, and for others do a rel=nofollow
<JoeSimmons> Good idea
<CletusC> That might conflict with the markdown parser though, I'm not sure
<sizzlemctwizzle> And those should really be posted to your forum, not your review.
<JoeSimmons> God I wish we had different colors in this room. My headache is confusing who said what, lol
<sizzlemctwizzle> What's this rel=nofollow?
<JoeSimmons> spammers
<JoeSimmons> posting links
<JoeSimmons> We disallow spiders to follow non-whitelisted links, was his suggestion, I believe
<CletusC> rel=nofollow on links tells google to not add it for page ranking
<sizzlemctwizzle> But we still get the spam?
<CletusC> But there becomes less reason to spam to begin with
<JoeSimmons> Regardless
<sizzlemctwizzle> We still need moderators.
<CletusC> As it stands right now, all that spam is contributing to their page rank. No page rank = less reason to spam.
<JoeSimmons> I'll mod every day, no problem
<JoeSimmons> Regardless of the amount of spam and how we handle it, disallowing spidering of spam links might still be worthwhile
<sizzlemctwizzle> But how do we choose new moderators. Hold a meetings of the Elders?
<sizzlemctwizzle> Or High Council?
<CletusC> Proper flagging of spam would be crucial, regardless of how we handle moderators
<CletusC> None of this "post in a thread" about spam
<JoeSimmons> I think we should deal with choosing mods later
<sizzlemctwizzle> Agreed.
<CletusC> Shouldn't OpenID solve a lot of the spammers too?
<CletusC> Login system should be something to question now I think
<sizzlemctwizzle> But I think people should be able to downvote post and if they drop below a thresold, the comment collapes.
<JoeSimmons> What is OpenID?
<CletusC> OpenID is basically an all-in-one login.. same like how you can login with google or facebook
<sizzlemctwizzle> OpenID is an api for user authentication.
<JoeSimmons> So it would allow users to login with facebook?
<sizzlemctwizzle> yeah like log in with facebook, but not tied to any site
<sizzlemctwizzle> no
<CletusC> OpenID/Google/Github would be a good few to look into
<JoeSimmons> No I get it, FB is just my example site
<CletusC> They all offer authentication, but whether having them all or not is a different question
<JoeSimmons> GitHub at least, right?
<sizzlemctwizzle> OpenID/Github for people who post scripts. Facebook/Google for regular users.
<sizzlemctwizzle> @JoeSimmons Technically not needed, but a good idea.
<CletusC> So a separate account for a user and dev? Doesn't seem good
<sizzlemctwizzle> Devs could use Faceboo/Google
<JoeSimmons> I don't think he was getting at separate accounts.. were you?
<sizzlemctwizzle> I just think Facebook/Google should be targeted at ordinary users.
<CletusC> https://npmjs.org/package/openid and https://npmjs.org/package/google-openid for starters
<sizzlemctwizzle> Same acount, different ways to authenticate.
<CletusC> Are we able to associate an OpenID or GH account later? I think that would be the ideal
<CletusC> Allow any for regular, but require devs to associate an openid or GH
<sizzlemctwizzle> Yeah, that's what I mean.
<CletusC> Also, no-brainer: gravatar for avatars
<sizzlemctwizzle> Yup.
<JoeSimmons> Agreed
<sizzlemctwizzle> Now the grand question: what is the name of our site?
<CletusC> Rewinding a bit, were we going to use MongoDB?
<CletusC> I think that'd be the best
<sizzlemctwizzle> Yes.
<CletusC> GoodQuestion.org
<CletusC> Right...? :D
<JoeSimmons> lol
<sizzlemctwizzle> openscripts.org is on sale for $230
<JoeSimmons> btw sizzle whats ur skype
<JoeSimmons> if u have one
<sizzlemctwizzle> I don't remember.
<JoeSimmons> oh. not on much ey?
<CletusC> openscripts is nice
<JoeSimmons> skype i mean
<sizzlemctwizzle> no. just once.
<sizzlemctwizzle> Do you have $250
<CletusC> Nope lol
<JoeSimmons> do u have any chat problems you use regularly so we could get in contact more easily?
<JoeSimmons> programs* yup.. wow
<sizzlemctwizzle> Just google
<sizzlemctwizzle> and irc
<JoeSimmons> oh
<CletusC> openuserjs.org is available
<sizzlemctwizzle> I like it. Mind if I buy it?
<truckmuddr> open-scripts.org but I've never been a fan of hyphens ha ha
<CletusC> Yeah hyphens are bad
<sizzlemctwizzle> I hate hypens
<CletusC> Plus scripts is pretty general. It should signify userscripts or JS in some way
<CletusC> OpenUserJS is fine with me. Joe?
<JoeSimmons> userscripts.info is available. what are your opinions on that suffix?
<sizzlemctwizzle> I like org
<JoeSimmons> Not saying I don't, just bouncing ideas out there
<JoeSimmons> OpenUserJS is pretty good
<sizzlemctwizzle> I like openuserjs
<JoeSimmons> But 3 words? hmm
<CletusC> I think org would be better suited, considering what it will be
<JoeSimmons> User-JS.org but... hyphen
<sizzlemctwizzle> yeah I think we should have open in the name.
<sizzlemctwizzle> it's what makes us different.
<sizzlemctwizzle> it defines us.
<JoeSimmons> UserJSSite.org UserJSOnline.org listing some available ones
<sizzlemctwizzle> both .com and .org are available
<sizzlemctwizzle> for openuserjs
<CletusC> openuserjs is really as short, character-wise, as we will probably get
<CletusC> A bit hard to say, but perhaps we could abbreviate it in some way, similar to how userscripts.org is often known as USO
<JoeSimmons> JSOpen.org is avail
<JoeSimmons> but idk
<CletusC> Only problem with that is http://www.openjs.com/
<truckmuddr> jsscripts.org
<CletusC> Don't want to get anyone confused
<JoeSimmons> hmm
<sizzlemctwizzle> well I have both openuserjs.com and openuserjs.org sitting in my shopping cart right now.
<JoeSimmons> OpenUserJS is a nice choice. The best I've seen so far
<sizzlemctwizzle> you can see my I saved this question for last
<sizzlemctwizzle> naming is hard work
<JoeSimmons> If you make it so, then yes :p
<CletusC> Yeah, me and truckmuddr have been through this on another site
<JoeSimmons> Naming, no. Picking a GOOD name, definitely.
<CletusC> I'm good with OpenUserJS
<JoeSimmons> TheBestOpenSourceUserOrientedJavaScriptSiteOnline.org?
<JoeSimmons> :p
<CletusC> YES
<CletusC> Lol
<JoeSimmons> haha
<JoeSimmons> Our abbreviation would be longer than peoples' attention spans, lol.
<JoeSimmons> A sense of community needs to be implied in our name choice
<sizzlemctwizzle> Alright, I own the domains.
<JoeSimmons> I'm fine with OpenUserJS if we decide to go with that
<JoeSimmons> Nice
<CletusC> Good with me
<sizzlemctwizzle> We'll prefer the .org one but .com will work too.
<CletusC> Redirect the .com to .org, IMO
<JoeSimmons> For sure. It
<JoeSimmons> It's what USO does
<sizzlemctwizzle> Did they always own userscripts.com?
<JoeSimmons> Do all browsers support meta redirection btw?
<JoeSimmons> Idk siz
<sizzlemctwizzle> You use http header redirection
<CletusC> ^
<CletusC> meta redirection is oldschool--avoid it
<JoeSimmons> Different from meta redirection?
<JoeSimmons> oh
<JoeSimmons> See how well educated I am on servers?
<JoeSimmons> :p
<sizzlemctwizzle> I can't remember the code for redirection. One is for temporary and the other is for permadent.
<CletusC> I only know this because of htaccess, but that's Apache
<CletusC> We'd have to figure it out for Node or whatever is on the stack
<JoeSimmons> I'm sure we'll figure it out
<sizzlemctwizzle> I can just get the domain register I used to do it for me.
<sizzlemctwizzle> I've done this a ton of times.
<CletusC> That works too.. also, to www. or not to www.
<CletusC> No www IMO
<sizzlemctwizzle> not www
<truckmuddr> www gets no love anymore...
<sizzlemctwizzle> www redirects to not www
<CletusC> Can you do subdomain redirects through your domain register as well?
<sizzlemctwizzle> Yes.
<JoeSimmons> btw Sizzle --> http://userscripts.org/topics/127151#posts-520498
<sizzlemctwizzle> looks good.
<JoeSimmons> cool
<JoeSimmons> I'm not very experience in licenses. I just wanted one on all my scripts so people don't copy it and claim it as their own, that's all really
<CletusC> Speaking of licensing--GNU GPL3+ with some version of Creative Commons?
<sizzlemctwizzle> Yeah I get that. It's fine for anything, but a library.
<sizzlemctwizzle> Or we could got MIT?
<CletusC> That works too
<JoeSimmons> Should I not use that license I always use on my JSL library then, too?
<sizzlemctwizzle> But then people could take our work, hide it away, and start making money
<sizzlemctwizzle> If you want anyone to collaborate with you on something, it's best not to use a non derivative license.
<sizzlemctwizzle> I vote GPL for openuserjs.org
<JoeSimmons> Guys, real quickly, what do you add to the metadata of a script to have USO not list it when you upload? A guy on the forum asks
<sizzlemctwizzle> @include * ?
<JoeSimmons> I thought there was a @uso:unlist or something of the like?
<CletusC> You don't--it seems random to me
<sizzlemctwizzle> Really, that's a think?
<sizzlemctwizzle> *thing
<CletusC> Marti has some scripts unlisted, but it's not something documented or that seems possible from a non-admin
<JoeSimmons> http://userscripts.org/topics/31350
<sizzlemctwizzle> He asked for them to be unlisted.
<CletusC> Which brings up a possible thing for openuserjs.org: just have an "unlist" button which disables the install button
<JoeSimmons> I think a way of toggling listability (word?) would be nice
<sizzlemctwizzle> Yeah, I'd have no problem with that.
<sizzlemctwizzle> Of course the source would still be available so an experience user (or someone with a special script installed) could still install it.
<sizzlemctwizzle> Oh it we ever do ads, I want a install link to a script that removes them right below them lol.
<sizzlemctwizzle> *if we
<JoeSimmons> lol
<JoeSimmons> That wouldn't violate the TOS or anything?
<sizzlemctwizzle> Who cares.
<JoeSimmons> We care. Violate it, no ads. lol
<sizzlemctwizzle> You know the moment we put ads on the site, so user is going to make a script to remove them (probably me).
<CletusC> (or me)
<JoeSimmons> or me
<JoeSimmons> lol
<CletusC> (or adblock plus already)
<sizzlemctwizzle> Depends on who put the ads in.
<JoeSimmons> I'm fine with that. I'm just saying... it won't violate their rules, will it? I would love for it to be that way but I don't want to violate the tos
<truckmuddr> (I'll just make Cletus do it)
<CletusC> If ads, make them bearable and not spyware looking
<CletusC> We don't want a big green download ad right below the install button, right?
<JoeSimmons> Also... I vote we give an ID or a good classname to nearly every element on the page, so it's easy for scripts users to modify anything style wise
<sizzlemctwizzle> Yeah, they'd probably drop us when they found out and we'd just have to find another ad provider.
<sizzlemctwizzle> @Joe Hell yeah.
<CletusC> Agreed joe, make it easy to script for the site
<CletusC> encourage scripts for the site--that's how enhancements come
<JoeSimmons> I hate the sites that don't have any IDs or classes and you can't get to the element to modify it lol
<CletusC> Then we could approach the author of the script and build it right into the site
<CletusC> Depending on what it is, of course
<sizzlemctwizzle> And then encourage those script writers to contribute to the site.
<JoeSimmons> Encourage the users to design our site via scripts. heh. We have a default style, and then users can easily modify it with scripts
<sizzlemctwizzle> I wish they would have built my comment quoting into USO
<CletusC> One thing to possible keep in mind down the line is an API maybe--for what I'm not sure, but an API if needed
<JoeSimmons> Yes good idea. I could see that being useful in the future
<CletusC> What are we planning for meta.js and user.js routines?
<JoeSimmons> btw @uso:unlisted is not really implemented. It's just used for Marti's updater it seems, not actually on USO
<JoeSimmons> What do you mean?
<CletusC> One thing I've wanted to bring up with greasemonkey is to request scripts with a user agent
<sizzlemctwizzle> user.js is servered as static files
<sizzlemctwizzle> .meta.js is a mustache template (maybe cached).
<CletusC> Updates I mean... so if GM requests .user.js for some reason for update checks, we could serve the .meta.js instead... that might be down the line though and only after a GM patch
<JoeSimmons> I don't know if this is a stable enough idea, but, what if the user had to tell our site which browsers it is compatible with, and if a user installs it that won't be able to run it, our site will notify him?
<CletusC> The exact point of GM is to prevent a site from knowing GM is installed, so I don't know how that would work
<sizzlemctwizzle> I have some experience with GM dev, I could do that patch.
<CletusC> Well, nvm
<CletusC> Have the users list compatibility is nice though
<JoeSimmons> Sorry, I mean the scriptwright has to specify which browsers his/her script is compatible with. Then we can determine if the user attempting to install the script would be able to run it
<sizzlemctwizzle> GM already treats USO differently, we can be special too.
<JoeSimmons> Nothing to do with GM or any specific addon
<sizzlemctwizzle> At best we could just warn them. Even if we know what browser they use, we don't if they have a userjs engine installed.
<CletusC> @sizzle, I mean just a general header... send a header with update checks like X-Greasemonkey-UpdateCheck or something, that way _any_ site could handle it as they see fit
<JoeSimmons> really?
<CletusC> Yeah, just a warning is best
<JoeSimmons> For example, a user tries installing a script. He gets a notification that the script he's installing won't be compatible with his browser
<CletusC> At that point, if the user continues, not our fault or the script dev
<sizzlemctwizzle> Yeah, I like that header idea Cletus. If we recieved it we could serve them the .meta.js file.
<CletusC> We warned them, they still proceeded
<JoeSimmons> That requires the scriptwright supply which browsers and addons he supports, though
<sizzlemctwizzle> Yeah it could be just an option.
<JoeSimmons> Hey, since it's just us 3 (or 4, dunno if truck is still with us), can we just move to Skype? I'm having a hard time following who's who with this webchat.freenode.net
<CletusC> something like "enable compat. checking" then when checked, show the options for browsers/addons
<sizzlemctwizzle> Nobody has to do it, but a know a few **cough** Marti **cought** who might.
<sizzlemctwizzle> I'd have to install Skype again.
<CletusC> Honestly, not sure what else we need to talk about--we covered pretty much everything i think
<JoeSimmons> Yea like if the scriptwright enables this feature, it could notify the user if their browser is incompatible with the script. This would require the scriptwright to specify which browsers and addons it is compatible with
<JoeSimmons> Btw I'm going to learn Node.js after this lol
<CletusC> Yeah Joe, that's the idea. A global feature that when enabled, requires the scriptwright to check which browsers they support
<sizzlemctwizzle> This page: http://nodejs.org/api/
<sizzlemctwizzle> And this page: http://expressjs.com/api.html
<JoeSimmons> So Express is what? An extension of Node?
<CletusC> A module
<sizzlemctwizzle> A module, but esentially yes.
<sizzlemctwizzle> And this page: http://mustache.github.io/mustache.5.html
<CletusC> NPM stands for Node Package Manager, and Express is a package (or module)
<sizzlemctwizzle> And then go look at the source of my site for a simple example: https://github.com/sizzlemctwizzle/sizzlemctwizzle.com
<JoeSimmons> Okay. So learn Node, Mustache, and Express
<sizzlemctwizzle> Be sure to check out the "Watched" branch.
<sizzlemctwizzle> Don't spend to much time on express.
<sizzlemctwizzle> Your brain will melt.
<CletusC> Mainly Node and Mustache.. the Express part seems too confusing :P
<JoeSimmons> Okay lol
<CletusC> Express just to get the gist of it I'd say.. Node is the main thing
<JoeSimmons> So what would we use Express for?
<JoeSimmons> Or rather, the difference between what we would do with Mustache vs what we would do with Express
<CletusC> Handling request, pathnames, what to serve basically--right, sizzle
<sizzlemctwizzle> It is our web server.
<JoeSimmons> I thought Node was the web server?
<sizzlemctwizzle> No
<CletusC> You can write your own web server in Node, but Express just does it for you
<sizzlemctwizzle> It has some HTTP apis, but it's web server abilities are simplistic.
<sizzlemctwizzle> Seriously, I wrote my own web server and then replace it with Express.
<sizzlemctwizzle> You look at and figure out what this file does: https://github.com/sizzlemctwizzle/sizzlemctwizzle.com/blob/master/index.js
<JoeSimmons> Ah okay
<CletusC> So how do you plan on handling install counts, sizzle?
<sizzlemctwizzle> Oh god. No idea. I have to think about that one.
<CletusC> Would that X-Greasemonkey-Update and/or X-Greasemonkey-Install header help?
<CletusC> If X-Greasemonkey-Update, then count as update check, otherwise install?
<CletusC> And speaking of that possible header, how would Tampermonkey handle that?
<sizzlemctwizzle> I pretty much just want to count any access out a .user.js file as an "install"
<JoeSimmons> I think we'd have to, right?
<sizzlemctwizzle> We'd also have to worry about ViolentMonkey.
<JoeSimmons> Yup
<CletusC> Is ViolentMonkey still relevant with Opera being on Webkit now?
<CletusC> ViolentMonkey is still only compatible with the old version of Opera
<sizzlemctwizzle> That's why I'd like to keep install counts raw and still.
<JoeSimmons> It would be the easy way
<JoeSimmons> Do we count unique IPs? (e.g., count updates as new installs?)
<sizzlemctwizzle> No.
<sizzlemctwizzle> Any access.
<JoeSimmons> Good cuz USO does, or did
<CletusC> Ah, so the header would allow you to redirect to the meta.js, but still any user.js is an install
<sizzlemctwizzle> yeah
<CletusC> Hits to the meta.js would count as update checks I would assume, which might give an accurate count of active users?
<JoeSimmons> We had planned to require a GitHub account, I think
<CletusC> Github or OpenID if you actually wanted to host a script, I thought
<CletusC> Associate it with the account someway
<smk> yea i was thinking of openid too, so it takes less effort to sign up
<CletusC> Signin with Google/Facebook/OpenID/Github, but only allow script uploads if a Github or OpenID is associated with the account
<sizzlemctwizzle> No GitHub acount needed, but it makes things easier. Otherwise you just get a simple, user script upload button.
<JoeSimmons> Sorry smk. mIRC will color other nicks but not yours. lol :D
<CletusC> Were you planning on doing normal user registration, or just auth with one of those services?
<JoeSimmons> How cool would it be if you could sign up to our site and link your already big GitHub account with it
<sizzlemctwizzle> just auth with those services.
<smk> @joe: thats cool i dont enable nick colors :p
<smk> i'd say provide normal registration as an option
<smk> registration on site + github, or openid for both
<JoeSimmons> Normal registration would be nice
<sizzlemctwizzle> we put a box on our site that lets them register an openid
<JoeSimmons> Like Gravatar then?
<sizzlemctwizzle> basically openid is our normal registration.
<smk> are we going to port the existing scripts over?
<JoeSimmons> Yea like Gravatar used to (or is) be
<sizzlemctwizzle> No. they can come to us.
<CletusC> I would say no, smk. Scripts or content should stay as-is and let users decide
<JoeSimmons> Well... if they want to switch over, they can copy their own scripts.. right?
<sizzlemctwizzle> Yes, and ideally into a github repo that they link to their account.
<JoeSimmons> We wouldn't know what their registration info is, if we were going to port ALL scripts over
<sizzlemctwizzle> We could site scrape, but we don't have their permission.
<smk> true
<JoeSimmons> We would have to assign the scripts to a user account though, and we wouldn't know their user information like password, email etc in order to do that, right?
<sizzlemctwizzle> Alright it's getting late here, and I don't have a weird sleep schedule like Joe, so I'm getting off.
<smk> and another suggestion, instead of issue voting on scripts, i was thinking of doing it stackoverflow style with moderator flags
<CletusC> No, but we could probably assign some hash, random or otherwise, that uniquely identifies an account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment