Page 1 of 1

Song lyrics with javascript code

Posted: Fri Nov 28, 2014 2:40 am
by kovtunos
For a some time G-que fetches the lyrics with some javascript code. It looks like:

(function() {var opts = {artist: "Tequilajazzz",song: "?????",adunit_id: 39382076,div_id: "cf_async_" + Math.floor((Math.random() * 999999999))};if($('.ArticlePreview').length == 0){document.write('');var c=function(){cf.showAsyncAd(opts)};if(window.cf)c();else{cf_async=!0;var r=document.createElement("script"),s=document.getElementsByTagName("script")[0];r.async=!0;r.src="//srv.tonefuse.com/showads/showad.js";r.readyState?r.onreadystatechange=function(){if("loaded"==r.readyState||"complete"==r.readyState)r.onreadystatechange=null,c()}:r.onload=c;s.parentNode.insertBefore(r,s)};}})();???? ??????
???????? ? ???????? ?? ????????...
?????? ?? ?????
???????? ???? ? ??????? ???????...

My sources for fetching the lyrics are in attachment.
OS: Kubuntu 14.04
G-que: last svn-1892 from official PPA

Song lyrics with javascript code

Posted: Fri Nov 28, 2014 5:14 am
by anonbeat
What source gives this result? The lyrics source page has changed the code and the options guayadeque uses must be updated.

Song lyrics with javascript code

Posted: Fri Nov 28, 2014 4:26 pm
by anonbeat
Ok I did some testing and there is an easy fix...

Go to Preferences -> Lyrics

Double click over lyrics.wikia.com then go to exclude and add a new item clicking in the + icon at the right of the exclude section

and in the exclude editor option fill just the begin field with

Click accept and accept again and that is... this will remove the javascript from this source.

Thanks for your help

Song lyrics with javascript code

Posted: Fri Nov 28, 2014 5:33 pm
by kovtunos
Ha! It works. Thank you very much!

Song lyrics with javascript code

Posted: Wed Mar 11, 2015 1:30 pm
by Queejibo
Trying the solution directly from above, all the lyrics disappeared from lyrics.wikia.com. Instead, I had to use the following:

Begin:
End: insertBefore(r,s)};}})();