📜 ⬆️ ⬇️

Toaster - all in the composter. Filter and Kayfuy

It so happened that in the CIS the Russian Q & A resource on IT topics is quite popular - Toaster . However, he lacked something when I started to get acquainted with him tightly. This resulted in an improvement in the form of a browser extension. Meet

Key features:


Initially, the extension was made for himself with a single purpose: to show the percentage of user questions in which he bothered to click the "Mark a decision" button. Then little by little they added one or the other Wishlist, until the tool grew into a monster by a hundred kilobytes. However, the principle of "do not use anything extra" was observed to the end.
')
One of the main features now is the use of formulas in the settings. With them, you can do almost anything, any Wishlist to manage their attention. The main thing is to know what to want. Hiding, changing colors and notifications are the three main aspects of attention when working with the site. Filtration of everything and everything is the key to convenience.

An example of a flexible rule that allows you to receive notifications on a specific topic:

 !tag(" ") && !contains(t,"") && contains(t,"") && !tag("HTACCESS") || containsWord(t,"") || contains(t,"") || contains(t,"") || contains(t,"") || contains(t,"") || contains(t,"") || contains(t,"") || containsWord(t,"") || containsWord(t,"") || containsWord(t,"") || containsWord(t,"") && tag(" ") = notify 

I’ll say right away that it was impossible to use the eval () function. So do not particularly clears up. Therefore, I had to write my crutch for 5 KB of code using the reverse Polish entry . It can be said, strongly castrated JS, both in function and syntax.

Recently there was a post about Toster Extension . If to compare, then TE has more pleasant interface and some functions which are not in Toster Comfort. However, my expansion focuses on resource consumption. However, no one bothers to use both extensions, they should not conflict.

In an amicable way, TC needs to be rewritten from scratch, because the work can be accelerated at least twice, and the work with the cache can be rewritten 10 times, abandoning localStorage and JSON.stringify () and changing some architectural solutions. But this feat is not to be done by me. And I'm a fan of the principle of "work - do not touch." While vacation, I actively accept issues and PR, but not to the detriment of minimalism. Thanks for attention!

Source: https://habr.com/ru/post/448834/


All Articles