Google Search Extra Buttons

Add buttons (past 1/2/3 days, weeks, PDF search etc.) for Google search page

< Feedback on Google Search Extra Buttons

Question/comment

§
Posted: 14.08.2017

Not working anymore?

I dont see the buttons anymore. Could you update please?

spmbtAuthor
§
Posted: 14.08.2017

Hi, Roxz!
In my region all works, and loading from Singapore, USA (using SEOGlobal Extension for Fx) works also.

In some cases, hiding of buttons may be by another extensions (NoScript etc.) or settings of Fx (or Chrome). It shows practice and comments.

§
Posted: 14.08.2017
Edited: 14.08.2017

I'm using violentmonkey addon to use scripts on firefox and it gives an error saying that the script is not using @grant could that be the problem?

I tested on singapore, mexico argentina and japan regions and none of them work.

EDIT: I'm not using any addons that have privacy stuff on them except for ublock which I disabled and still dind't work. I also tested on a new profile with the same addons and it's working there. Could a firefox preference be the problem?

spmbtAuthor
§
Posted: 14.08.2017
Edited: 14.08.2017

Firefox works with this native userscript normally. Most likely, it not compatible with violentmonkey (not be tested). Some time before, I test it with Tampermonkey+Safari+MacOS, it was work well.

I recommend to set this userscript as native in Firefox. In Chrome (Chromium, Vivaldi, Opera), I set as native also (need manifest.json, described in https://greasyfork.org/en/scripts/7543-google-search-extra-buttons . Or it may to work in Chrome+Tampermonkey.

If you debug for violentmonkey, I will insert pull request in this script (but I think, this solution is not popular).

§
Posted: 15.08.2017

It works in violentmonkey. Like I said I tested on other profiles with the same setup I have on my main profile the only difference is the configuration of firefox.

How can I do the debug?

spmbtAuthor
§
Posted: 15.08.2017

> I dont see the buttons anymore
> I'm using violentmonkey addon to use scripts on firefox and it gives an error saying...
If you show buttons, then all OK, not need debugging. (If not show, you may investigate cause of it, so to debug script.)

§
Posted: 15.08.2017

I have 2 different firefox in my computer. One of them that I use for testing, and one that I use normally everyday. On firefox testing, your script works, on "normal" firefox it does not. The only difference between them is the configuration of the firefox settings. This is what I said before.

Therefore, "violentmonkey" is not the reason that it does not work.

If you could tell me how to "debug", we can correctly find the reason why the script fails

---------

У меня есть 2 разных firefox на моем компьютере. Один из них, который я использую для тестирования, и тот, который я использую обычно каждый день. При использовании тестирования firefox ваш скрипт работает, но он не работает с «обычным» firefox. Единственная разница между ними - это конфигурация настроек firefox. Это то, что я сказал раньше.

Поэтому «violentmonkey» не является причиной того, что он не работает.

Если бы вы могли сказать мне, как «отлаживать», мы можем правильно найти причину, из-за которой сценарий терпит неудачу

spmbtAuthor
§
Posted: 16.08.2017

По опыту 2 диалогов с пользователями, такие проблемы были - когда-то установили расширения, потом убрали, но Preferences оказались испорченными в неизвестном месте. При установке нового Firefox - скрипт работает. Поэтому можно обновить Firefox и по очереди ставить расширения, следя, не ломают ли они этот скрипт. Причина сломанных настроек - наиболее вероятна, но мне не встречалась. (Next, I write in English for possibility of reading of other users.)

How to debug this script.

It need to found place in code, from which script not build DOM branch with additional buttons. You may to trace script by placing а console.log() in important points:

1)
xLocStor({do:'get', key:'sett', val:setts, cB: function(prev,undef){
console.log('begin of work');
S = prev || setts;

2)
console.log('Search button is found&', buttSearch && top == self);
if(buttSearch && top == self) for(var i in buttS) if(i !='site'|| S.sites){ //buttons under search input line
if(i.length ==2) iD++; else iD=-1;
var bI = buttS[i]

3)
,$e = function(g,el){ //===create or use existing element===
...
g.apT && g.apT.appendChild(o);
console.log('element of DOM is created: ', o);
}
return o;
}

4)
Then, if created DOM branch is not visible on the screen, find CSS styles for it - maybe, branch is not visible by some styles unknown for me (from another preferences or scripts for example).

For debugging, you may to go all 4 steps or reinstall Firefox (or install script in Chrome). Also, I did test script in K-Meleon, but installing in it may be more difficult.

§
Posted: 16.08.2017

Sorry if this is not what you meant but it seems that is very difficult for us to understand each other in english I tried using google translate to talk to you in your own language but I cant understand what you said in Russian translating back to english.

Here is my console.log after visiting google https://hastebin.com/uhefoxozax.sql

This is my web console log

The use of Mutation Event is obsolete. Use MutationObserver instead. Search: 321: 8
SyntaxError: expected expression, got ',' [Learn more] search: 52: 12
SecurityError: The operation is insecure. SaveYourLocalStorage.html: 20
Error running script: Maximize Video
TypeError: getComputedStyle (...) is null
GetComputedStyle (...) is null saveYourLocalStorage.html: 1: 7414
SyntaxError: expected expression, got ',' [Learn more] saveYourLocalStorage.html: 52: 12

spmbtAuthor
§
Posted: 16.08.2017
Edited: 16.08.2017

>... translating back to english.
: )
I think that you speak Russian. I wrote, by experiense of dialogs about problems of this script, two users has not extra buttons on the screen, even after removing of all extensions from Firefox. But new installation of Extra Buttons was work. I have not this case in my practice. Therefore, you may to make new installation of Fx and find addon which break my script by add one by one addon. Or use another browser.

(I may speak not exactly, but have not difficult to read.)

OK, next.

https://hastebin.com/uhefoxozax.sql - I show clean black page here with no logs.

> SecurityError: The operation is insecure. SaveYourLocalStorage.html: 20
-----
I have not such message in console, but it speak, that your browser does not allow access to external domain, where I save "external localStorage", because Google cleans localStorage on the domain google.* periodically.

As solution, you may disable сall of function xLocStor() in my script.

> The use of Mutation Event is obsolete. Use MutationObserver instead. Search: 321: 8
-----
In my script I noy use MutationObserver, then it error generate any script on the your page (google.com?) and, I think, this is cause of errors, but don't know mechanism of it.

> GetComputedStyle(...) is null
-----
I not use this function in my page https://github.com/spmbt/googleSearchExtraButtons/blob/master/saveYourLocalStorage.html , therefore it is tracks of any addons from Firefox or virus (I think), which add own script to this page https://spmbt.github.io/googleSearchExtraButtons/saveYourLocalStorage.html (view source of the page).

Post reply

Sign in to post a reply.