Skip to content

Instantly share code, notes, and snippets.

@dotriz
Created August 28, 2017 14:28
Show Gist options
  • Select an option

  • Save dotriz/b3ecb51ee7268a847f29a21dcc8a0935 to your computer and use it in GitHub Desktop.

Select an option

Save dotriz/b3ecb51ee7268a847f29a21dcc8a0935 to your computer and use it in GitHub Desktop.

Revisions

  1. dotriz created this gist Aug 28, 2017.
    7 changes: 7 additions & 0 deletions change-favicon.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    function change_favicon(new_favicon_path)
    {
    $('link[rel="shortcut icon"]').remove();
    $('head').append('<link id="favicon" href="'+ new_favicon_path +'" rel="shortcut icon" type="image/png" />');
    }

    change_favicon('/paht/to/favicon.png');