11

The following userscript will replace the default badge icons with little rubber ducks

enter image description here

enter image description here

// ==UserScript==
// @name        StackExchange, replace badge icons
// @match       *://*.askubuntu.com/*
// @match       *://*.mathoverflow.net/*
// @match       *://*.serverfault.com/*
// @match       *://*.stackapps.com/*
// @match       *://*.stackexchange.com/*
// @match       *://*.stackoverflow.com/*
// @match       *://*.superuser.com/*
// @exclude     *://api.stackexchange.com/*
// @exclude     *://blog.stackexchange.com/*
// @exclude     *://blog.stackoverflow.com/*
// @exclude     *://chat.stackexchange.com/*
// @exclude     *://chat.stackoverflow.com/*
// @exclude     *://data.stackexchange.com/*
// @exclude     *://elections.stackexchange.com/*
// @exclude     *://openid.stackexchange.com/*
// @exclude     *://stackexchange.com/*
// @exclude     *://*/review
// @grant       GM_addStyle
// @run-at      document-start
// ==/UserScript==

GM_addStyle ( `

      /* change icons of badges */
      .badge1, .badge2, .badge3 {
         background-image: url("https://svgshare.com/i/9LE.svg") !important;
      }

` );

Caveat:

For a reason unknown to me, the ducks are cut off on some sites. For example they work fine on sites like

  • tex.stackexchange.com
  • codereview.stackexchange.com

but are cut off on

  • stackapps.com
  • meta.stackexchange.com

(these problems have been fixed in the answer https://stackapps.com/a/8117/54601 by Brock Adams)

  • See the revised answer. Also, I added some metadata to your post; reference https://stackapps.com/a/8113/7653 and https://stackapps.com/questions/tagged/script?sort=active. – Brock Adams Nov 17 '18 at 05:52
  • @BrockAdams You are the best! Thanks a lot also for adding the meta information to my question, I was not aware of this possibility! – samcarter_waiting_for_siparty Nov 17 '18 at 13:01
  • PS: I'm amazed at how much having duckies everywhere makes SE sites a little better. Thanks for the idea. – Brock Adams Nov 19 '18 at 18:31
  • 1
    @BrockAdams I feel the effect too, I'm much more relaxed with low quality post etc. if there are lots of ducks in my field of view :) Maybe making this the default design would be much more effective then all this welcome wagon initiative thingy :) – samcarter_waiting_for_siparty Nov 19 '18 at 20:52

1 Answers1

5

Source: See GitHub: Stack Exchange, replace badge icons with duckies... and post bug reports and pull requests there.

Install: Install from GitHub

Made some tweaks as follows:
June 01, 2019:

  • Turned on styling for network-user pages.
  • Fixed a race condition / GM_addStyle bug whereby the styles were not sticking for certain page loads.

November 16, 2018:

  • Switched to proper SE image host because svgshare.com was crashing and "exceeding quota".
  • Restored scripts to review paths, since they need duckies too.
  • Moved the script to GitHub, where we can support it more effectively.

November 13, 2018:

  • Fixed the icon cutoffs.
  • Streamlined the @excludes.
Brock Adams
  • 12,901
  • 5
  • 38
  • 64