Skip to content

Instantly share code, notes, and snippets.

@r-k-b
Last active June 23, 2016 03:00
Show Gist options
  • Save r-k-b/329d1fb5cbf4de0f7d3f322a5ecc1cbe to your computer and use it in GitHub Desktop.
Save r-k-b/329d1fb5cbf4de0f7d3f322a5ecc1cbe to your computer and use it in GitHub Desktop.
show BC field name in Admin UI
// ==UserScript==
// @name Show BC form field name in Admin
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Show BC form field name in Admin UI
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/329d1fb5cbf4de0f7d3f322a5ecc1cbe
// @downloadURL https://gist.github.com/r-k-b/329d1fb5cbf4de0f7d3f322a5ecc1cbe/raw/show-bc-field-name-in-admin.user.js
// @match https://*.worldsecuresystems.com/*
// @grant none
// @run-at context-menu
// ==/UserScript==
/* jshint esnext: true */
(($) => {
// todo: fix this: https://goo.gl/1eZbKr
const $container = $('#form-system-field');
$container.find('label').each((index, elem) => {
const $elem = $(elem);
const newText = `<p>「<code>${ $elem.prop('for') }</code>」</p>`;
$elem.before(newText);
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment