Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

Major syntax error

About: Google Black Bar Returns Now Customizable!
Not sure if this author is supporting this script, or if he actually authored it?

function() { document.body.innerHTML = newBody; },

All these reports and nobody has caught that you simply do NOT even have the newBody var defined anywhere! Trying to figure out what the heck you were trying to do in part of this I ask if you were the original author because it seems like there is just a bunch missing that would have been defined in the newBody causing many of these issues people have been reporting for it looks like years.....


Bình luận

  • For those also seeing the halting errors on this script, I see no reason not to simply delete the completely erroneous, unneeded block of (until the author can either agree it's placement is a mistake, or let us in on the missing HTML for the newBody he never defined):

    window.addEventListener(
    'load',
    function() { document.body.innerHTML = newBody; },
    true);
    

    That should clear up all the critical JS execution halting errors and make it run clean (at least in Chrome).

  • đã sửa April 2017 Chrome
    Hey Collin!

    Original Author here, I had originally posted this script on UserScripts quite a few years back. I'm not sure who has been maintaining it, I appreciate them keeping it semi-workable, though.

    This was the first script I had ever written with JavaScript, there are bound to be quite a few errors. That code block being one of them, it appears. I didn't know JS, but hated the change Google made so I tried to fix it, errors and all. I, however, haven't used this script for a very long time. Once UserScripts had collapsed I quit working on it. I understand JS better now than I did so many years ago, but I am no expert, obviously! I intend on rewriting a better script, whenever I do I will post a comment forwarding people to it.
Đăng nhập hoặc Đăng ký để gửi bình luận.