开发者

How do I get firebuglite to load opened?

开发者 https://www.devze.com 2023-02-05 12:27 出处:网络
here\'s the code I have so far: var scriptTag = document.createElement(\'script\'); scriptTag.type = \"text/javascript\";

here's the code I have so far:

    var scriptTag = document.createElement('script');
    scriptTag.type = "text/javascript";
    scriptTag.src = 'http://getfirebug.com/firebug-lite.js';
    document.getElementsByTagName('head')[0].appendChild(scriptTag);
    var ready = function() {console.log('test');};
    scriptTag.onreadystatechange = function () {
        if (scriptTag.readyState == 'complete') {
            ready();
        }
    }
    scriptTag.onload = ready;

The problem is that when I use it, firebug just sits there in the lower right corner. I would like it to actually open up and show the log message.

It's the difference between here and th开发者_Python百科is

What is that bookmarklet doing different?


Figured it out. Demo: here I just needed to add '#startOpened' to the end of the url

0

精彩评论

暂无评论...
验证码 换一张
取 消