Widget:Mybutton: verschil tussen versies

Uit basis
Naar navigatie springen Naar zoeken springen
Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Regel 23: Regel 23:
       evt.stopPropagation();
       evt.stopPropagation();
       console.log("Button - Username: " + mw.config.get("wgUserName"));
       console.log("Button - Username: " + mw.config.get("wgUserName"));
       $.get("https://infvo.nl", (res) => {console.log(res);});
      data = {};
      data.kind = 0; // start
      data.userid = mw.config.get("wgUserId");
      data.pageid = mw.config.get("wgArticleId");
      data.pagename = mw.config.get("wgPageName");
       $.post("https://transparent-spruce.glitch.me/events", data, (res) => {console.log(res);});
     }
     }



Versie van 27 dec 2019 22:27

This widget allows you to embed a button on your wiki page.

Created by User:Eelco

Using this widget

For information on how to use this widget, see ???

id= text=

Issues:

  • multiple buttons per page are allowed;
  • each button on a page must have a unique name (id);

Copy to your site

To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Mybutton.