• Hello,

    Since I post code snippets on my site, I find your plugin very useful.

    However, it’s causing an error:

    document.getElementById("content") is null

    That is because it’s loaded on all admin pages and it can’t find the #content textarea.

    Can you make it so that it only loads on the post & page editing screens?

    It’s just a matter of adding this code just after

    Just after this line:

    function to_doscript()
    {

    add:

    global $pagenow;
    if ( ! in_array($pagenow, array('post-new.php', 'post.php', 'page-new.php', 'page.php')) )
    	return;

    Thanks.

    PS: It would also be a good ideea to rename the to_doscript() function to something like tab_override_script() to prevent collisions.

    http://wordpress.org/extend/plugins/tab-override/

Viewing 1 replies (of 1 total)
  • Thread Starter scribu

    (@scribu)

    I see this is resolved in the new version. Nice.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Tab Override] Javascript loaded on all admin pages’ is closed to new replies.