spmbt / googleSearchExtraButtons

Google Search Extra Buttons
66 stars 20 forks source link

Hi, will you update this script? #10

Closed blob2015 closed 7 years ago

blob2015 commented 7 years ago

firstly get this at https://greasyfork.org/en/scripts/7543-google-search-extra-buttons but it seems out of work now

spmbt commented 7 years ago

OK, I push this little refactoring now from actual copy https://greasyfork.org/ru/scripts/7543-google-search-extra-buttons?version=180241 . It works normally in My Fx 54.0.1 and Chrome 59.0.3071.115 (ru) (not start page of browser, but google.ru domain)

https://habrastorage.org/web/af9/875/8fe/af98758fe49c4e94abcf97a036683bfb.jpg - screenshot

If your copy is not work, write more details in issue, please (page, domain of url, language, country of location). Maybe, there are particular cases with out of work.

blob2015 commented 7 years ago

Thanks for your reply, Spmbt. I try it at google.ru, and it does work good. While I return to my logged in page, google.com, the problem emerges again. the page url, which I tested, the language, which I selected, both of them I captured. If you need more details, please just tell me. This is a good script, and a very useful tool. Thanks.

hs0092 hs0093

spmbt commented 7 years ago

It mean, what HTML-classes, used by Google in your test page, distinct from page in my environment (browser, country, etc.)

I use this parse string in JS code:

buttSearch = d.getElementsByName("btnG") && d.getElementsByName('btnG')[0] || design1612

next,

if(design1612 && !d16)
            buttSearch.parentNode.className +=' lsbb';
if(buttSearch && top == self) ... then build Extra Buttons ...

It works correctly in most instances of browsers in any countries/ If you may help to support this script in your environment, please, investigate your HTML and CSS classes in it.

Attempt to define buttSearch variable in your page. Then, I will insert your condition in common script to solve appearance of buttons.

blob2015 commented 7 years ago

sorry, crazy. looked it through, finally, I found a rule at uBlock Orign, google.com spmbt.github.io * block, so... 😀 😰 🍻

spmbt commented 7 years ago

Blocking of this domain mut not be block all script.... Thuis is local storage on the external domain. I will test this case, thanks.