After modifying a chrome extension‘js code and restart the chrome,the modified chrome extension becomes destroyed. Three months ago,i did the same thing to the same extension and it worked well.
This time i get a new computer and the lastest version chrome(46.0.2490.86 m),but once i modify the extension's source code it get destroyed.
Here is the source code and the extension. PS:i think it's because chrome refuse me to modify its origin extension code.
extension name:totop. extension function:Add a back to top button and go to bottom button on every page
i just modify "500" to "100" to accelerate its speed.
the main script.js:
$("head").prepend("<style>._BackToTopPlus{width:35px;height:35px;border-radius:5px; position:fixed; right:10px; cursor:pointer; background-repeat:no-repeat; background-position:50% 50%; background-color:#000; opacity:.1;transition:opacity .2s ease-in-out;z-index:99999;}._BackToTopPlus:hover{opacity:.5}</style>");
var level=$(window).height()/2-50;
$("body").append("<div class='_BackToTopPlus' style='background-image:url(data:img/png;base64,R0lGODlhEgAUAJEAAAAAAP///////wAAACH5BAEAAAIALAAAAAASABQAAAImjI+py+IPo4xmWmRpyq5dFkzgoY3VY5KS9ykcKy6vnMEr3W417hQAOw==);top:"+(level-40)+"px;'></div>").append("<div class='_BackToTopPlus' style='background-image:url(data:img/png;base64,R0lGODlhEgAUAJEAAAAAAP///////wAAACH5BAEAAAIALAAAAAASABQAAAIqlB2peX27nINKNsoswnrTLmABKJKcJH5PGl3siKZdabZgWN2rzuPv/yoAADs=);top:"+(level+5)+"px;'></div>");
var jsq=0;
$("._BackToTopPlus").eq(0).click(function(){$("body").animate({scrollTop:0},500);}).mouseover(function(){
jsq=setInterval(function(){
$("body").scrollTop($("body").scrollTop()-1);
},20);
}).mouseout(function(){clearInterval(jsq);jsq=null;});
$("._BackToTopPlus").eq(1).click(function(){$("body").animate({scrollTop:$(document).height()},500);}).mouseover(function(){
jsq=setInterval(function(){
$("body").scrollTop($("body").scrollTop()+1);
},20);
}).mouseout(function(){clearInterval(jsq);jsq=null;});