Raw Source
kalpdev.1 / Document highlight

// ==UserScript==
// @name        Document highlight
// @author    @shjaisw
// @namespace   kalpdev
// @description document in red if present and gives popup to check all
// @match    https://argus.aka.amazon.com/*
// @include  https://argus.aka.amazon.com/*
// @require     https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
// @require     https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
// @require  https://gist.github.com/raw/2625891/waitForKeyElements.js
//@require https://cdn.jsdelivr.net/npm/sweetalert2@10
// @resource    buttonCSS https://raw.githubusercontent.com/necolas/css3-github-buttons/master/gh-buttons.css
// @resource    bootstrapCSS https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
// @resource    githubButtonIconSet https://raw.githubusercontent.com/necolas/css3-github-buttons/master/gh-icons.png
// @grant    GM_xmlhttpRequest
// @grant    GM_addStyle
// @grant       GM_getResourceText
// @grant       GM_getResourceURL
// @version     3.6
// @downloadURL https://openuserjs.org/install/kalpdev.1/Document_highlight.user.js
// @updateURL https://openuserjs.org/meta/kalpdev.1/Document_highlight.meta.js
// @copyrights  kalpdev
// @license MIT

// ==/UserScript==



console.log("Start");

document.head.appendChild(cssElement(GM_getResourceURL ("githubButtonIconSet")));
document.head.appendChild(cssElement(GM_getResourceURL ("buttonCSS")));
document.head.appendChild(cssElement(GM_getResourceURL ("bootstrapCSS")));

function cssElement(url) {
  $("#category").removeClass("hidden");
  var link = document.createElement("link");
  link.href = url;
  link.rel="stylesheet";
  link.type="text/css";
  return link;
}

function highlightDoc(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}


highlightDoc (
	'button.md-no-style.md-button.ng-scope.md-dg-theme { background: #ff000094; }'
+
'div.toggle_header.strong.md-subheader._md.ng-scope.md-dg-theme.layout-align-center-center.layout-row { border-radius: 4px; position: relative; display: none;  }'
   );

              waitForKeyElements ("#dtProductFinal > div.w-75.layout-align-center-center.layout-column", addCustomSearchResult);


var url= window.location.href;
var isArgusDG = /^https:\/\/argus.aka.amazon.com\/#!\/dg(.*)/i.test(url);

if (isArgusDG){
    console.log("This is an Argus DG Page!");
}