Is there a battle for the net plugin?


(Dandrews) #1

I want to add a battle for the net widget to my discourse site for the day, is there a plugin I can can use or can someone show me how to install the widget?


(Dandrews) #2

Here’s the script I want to install for the day:

<script src="https://widget.battleforthenet.com/widget.js" async></script>

(David Taylor) #3

You can just put that code into a “theme component”.

  • Go to your forum admin panel,
  • “customize”,
  • “themes”,
  • choose your theme,
  • “edit CSS/HTML”,
  • </head>,
  • paste the code in
  • save
<script src="https://widget.battleforthenet.com/widget.js" async></script>

That code will only show on the date. If you want to test it now, use this code instead

<script type="text/javascript">
  var _bftn_options = {
    /*
     * Always show the widget. Useful for testing.
     */
    always_show_widget: true // @type {Boolean}
  };
</script>
<script src="https://widget.battleforthenet.com/widget.js" async></script>

(Dandrews) #4

Thanks! That’s what I was looking for. Works great.