Refined-github: Add option to specify custom JS

Created on 14 Apr 2018  Â·  11Comments  Â·  Source: sindresorhus/refined-github

Similar to #1186, it might be a nice feature to allow custom JS to be run. It could be useful to do custom things that don't necessarily need to be built in to the extension.

All 11 comments

The CSS field is useful because Refined GitHub’s CSS can’t be disabled, but JavaScript features already can be. If you need extra features just install tampermonkey.

Similarly, why not just install Stylish for the CSS?

Because un-disableable CSS is a mis-feature of Refined GitHub. That’s literally the only reason the field is in (hence its label).

The original reason for the custom CSS (https://github.com/sindresorhus/refined-github/pull/1172#issuecomment-373505600) was to tweak the style. I get that the only way to disable the CSS rules is by overriding them.
I'm happy to use Tampermonkey for custom JS, just thought it might be a useful addition for scripts that don't belong in features.

I'd use this feature.

You’re not wrong, perhaps I just always saw that as an “undo” field and the following PR by a third person read my mind exactly. 😁 However I still think people should install both stylish and tampermonkey to add custom code. Our plain textareas just aren’t fit for typing code (no syntax highlighting, no syntax errors, no linting). A few lines of CSS can be written that way; JavaScript maybe not.

I feel like either both languages should be supported or none. Making a compromise on CSS and adding it should also allow JavaScript to join.

The code itself can also be written outside that textarea. I've got some features myself that I would like to have but haven't been landing here since there are too many opinions on how it should work. Having this simple injection feature would allow me to easily - without installing any other plugin and having the sync mechanism between machines - add my own small features.

So whats the verdict here?

I'm not sure, but this seems like it would be a good solution for https://github.com/sindresorhus/refined-github/issues/1222.

good

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hkdobrev picture hkdobrev  Â·  3Comments

mareksuscak picture mareksuscak  Â·  3Comments

juliocanares picture juliocanares  Â·  3Comments

durka picture durka  Â·  3Comments

sompylasar picture sompylasar  Â·  3Comments