-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the resource database #67
Comments
I have to admit that even though I knew of A documentation of the reusable scriptlets should probably include simple example cases for each scriptlet, but I am not sure how detailed such a documention should be, i.e. how to explain it in a way that is understandable for the average user. |
Yea, how to design the page can be a difficult question, I think it should include:
There should be one page for each type, arranged alphabetically (or some other reasonable non-random sorting logic), and a third page for difficult vocabulary such as A guide to the subset of |
First screening. Something more to add? https://gist.github.com/gwarser/d1aabf7b013a7f3ae80dfcf6fb843abf #Empty redirect resources #General purpose scriptlets |
I will prefer for start to add documentation comments in source code... One paragraph of general description then list of resources with one line description and parameters should be enough.
No need to reinvent wheel, link to some "Regexp for dummies" will suffice. I can help filling technical info, but someone will have to write descriptions (at least start of) |
This is programming experience and bit of hacking skills :) |
Notifications in gists does not work. I try to chose list of site specific scriptlets and then create real wiki page. |
Why } else if ( /^\d+$/.test(cValue) ) {
cValue = parseFloat(cValue);
if ( isNaN(cValue) ) { return; }
if ( Math.abs(cValue) > 0x7FFF ) { return; } This is target = !(+target); |
Probably because I changed my mind to support only small integers but did not change the code to reflect this change of mind. |
This will be |
@gorhill What are you trying to achieve with that unary plus? That operator is really complicated, can we like, try to not use it? |
No need to complicate things, this is executed on scriptlet parameter, little chance to be something other than string. |
Ah, right, I missed that part. Then why not use |
Values set by |
I think that is by design, as the code checks for that specifically. |
https://github.com/gorhill/uBlock/wiki/Resources-Library feel free to improve. |
The current resource database is really difficult to navigate and almost nothing is documented.
There are two types of resources: ones that are designed for one or a few specific websites, and ones that could apply to all websites. As of now, they are all mixed together, and it's really difficult to find the resource you want unless you have memorized them.
From this issue, it seems that no one beside gorhill knows what the resource database actually contains, even okiehsch isn't really familiar with the new ones, and I had to read the implementation to know how to use
remove-attr.js
.For most people, that 2300+ lines of code are too much to chew, for this reason, I think we should add index and documentation for the resources in the wiki. I'm not too sure how should the wiki page be designed, but I can help once it is started.
The text was updated successfully, but these errors were encountered: