woubuc / TGC Create Widgets button

// ==UserScript==
// @name         TGC Create Widgets button
// @namespace    http://tgcwidgets.com
// @version      0.1
// @description  Adds a 'create widget' button to the game edit screen
// @author       Wouter Buckens
// @match        https://www.thegamecrafter.com/publish/editor/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

// Your code here...
$(function() {
    var id = window.location.href.split('/editor/')[1]
    var code = '<br><fieldset><legend>Create Widget</legend>Create an embeddable widget for your game on TGCwidgets.com<form action="http://tgcwidgets.com/#' + id + '" method="GET" target="_blank"><input type="submit" value="Create Widget" class="btn btn-primary"></form></fieldset>';
    $("fieldset legend:contains(Publish To Shop)").parent().after(code);
});