Emphasize private repo for GitHub

Display very large sticky `lock` icon.

  1. // ==UserScript==
  2. // @name Emphasize private repo for GitHub
  3. // @namespace http://kyanny.me/
  4. // @version 0.1
  5. // @description Display very large sticky `lock` icon.
  6. // @author Kensuke Nagae
  7. // @match https://github.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. if (document.querySelectorAll('h1.private').length > 0) {
  15. var svg = document.querySelector('svg.octicon.octicon-lock').cloneNode(true);
  16. svg.setAttribute('height', 160);
  17. svg.setAttribute('width', 120);
  18. var div = document.createElement('div');
  19. div.style.position = 'fixed';
  20. div.style.top = '60px';
  21. div.style.left = '60px';
  22. div.appendChild(svg);
  23. document.body.appendChild(div);
  24. }
  25. })();