Comments (8)
Here is some skeleton logic for when this gets implemented, feel free to use or abuse. Ref #3 for serving installs.
// .user.js
exports.install = function (request, response) {
if (!scriptExists) {
response.send(404);
}
if (request.accepts('text/x-userscript.meta')) {
// Forward request to meta routine.
// ...
return;
}
// Pull script source.
// ...
// Increase install count.
// ...
response.set('Content-Type', 'text/javascript');
response.send(200, scriptSource);
}
// .meta.js
exports.meta = function (request, response) {
if (!scriptExists) {
response.send(404);
}
// Pull script source.
// ...
// Increase install count.
// ...
if (request.accepts('text/x-userscript.meta')) {
response.set('Content-Type', 'text/x-userscript.meta');
}
else {
response.set('Content-Type', 'text/plain');
}
response.send(200, scriptSource);
}
from openuserjs.org.
We should respond with a content-type of text/javascript
for both. The accept header is just for knowing what they want. Also you left in the same comments for meta as script. We only increment the install counter when accept is not text/userscript-meta
. This is the only time we shouldn't increment the counter for a request of the .user.is file imo.
from openuserjs.org.
I actually meant that to be there, but not for installs (it should have said meta install count
). In short: a monthly estimated active users count in addition to the normal total installs. I'll branch that off into a separate issue/discussion though.
Edit: discussion posted here.
from openuserjs.org.
An update install would still count as an install, but I think we can ignore automated update checks.
I'll branch that off into a separate issue/discussion though.
Google Groups preferably.
from openuserjs.org.
Pardon the forced updates. I had to clean up after after myself.
from openuserjs.org.
This doesn't seems to work anymore... anyone can confirm?
Also; GreaseMonkey will standard have .meta.js
support, greasemonkey/greasemonkey#1885
from openuserjs.org.
This doesn't seems to work anymore... anyone can confirm?
Nvm, found how it works again; is on a different path. Then greasemonkey/greasemonkey#1885 will probably not work.
from openuserjs.org.
We already support greasemonkey/greasemonkey#1824 for this, and it has already been pulled and released (1.15).
from openuserjs.org.
Related Issues (20)
- Otter Browser HOT 2
- String.prototype.substr() deprecation
- `text/javascript` only
- Include rating in meta JSON HOT 16
- *bootstrap-markdown* and *marked* appear not compatible any more HOT 2
- Make the 400 "missing license" page more informative HOT 2
- The Donate button does not work on this page HOT 3
- Site reach problem HOT 1
- can't reach openuserjs.org website. HOT 2
- Fetching raw source (with Unicode) is broken HOT 3
- Support login using Keyoxide HOT 2
- [Off topic] spam HOT 2
- `@icon` has no data HOT 1
- Need to use GitHub as an authentication type is hidden behind having GitHub as an authentication type. HOT 1
- Unsure how to remove an authentication type. HOT 1
- 不会使用方便教一下吗?
- Specified file does not contain the proper metadata blocks when in fact it does HOT 3
- Too many redirects 429 when logging in via GH or user search HOT 1
- RSS Feeds for updated & new userscripts and forum HOT 4
- Login is prompted all the time : 429 Too many requests. Please retry after approximately 86460 seconds. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openuserjs.org.