UNPKG

danger-plugin-no-console

Version:

Danger plugin to prevent merging code that still has `console.log`s inside it.

12 lines (10 loc) 414 B
(function(){ var matched = location.pathname.match(/\/(manual\/.*?\/.*\.html)$/); if (!matched) return; var currentName = matched[1]; var cssClass = '.navigation .manual-toc li[data-link="' + currentName + '"]'; var styleText = cssClass + '{ display: block; }\n'; var style = document.createElement('style'); style.textContent = styleText; document.querySelector('head').appendChild(style); })();