Skip to content

Instantly share code, notes, and snippets.

@obedmhg
Last active November 30, 2016 11:31
Show Gist options
  • Save obedmhg/513bbf141bae69876b2d521da9d31dda to your computer and use it in GitHub Desktop.
Save obedmhg/513bbf141bae69876b2d521da9d31dda to your computer and use it in GitHub Desktop.
It willShow ProjectId on BCC, TamperMonkey Script
// ==UserScript==
// @name Append ProjectId BCC
// @description It will appen the project Id to the project name.
// @version 0.0.1
// @include /atg/
// @author Obed Murillo
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// ==/UserScript==
(function ($, undefined) {
$(function () {
$('a').each(function() {
if (this.href.indexOf("project=") >= 0) {
var afterProject = this.href.split("project=");
var projectId = afterProject[1].split("&")[0];
$(this).after( "<div style='border: 1px solid white; background-color: #00AC10; color: white; width: 65px; height: 12px; text-align: center; vertical-align: middle;line-height: 12px; '>"+projectId+" </div>" );
}
});
});
})(window.jQuery.noConflict(true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment