Linkedin Enhancer-Logo&Favicon invisiable

Enhance your LinkedIn experience with this script! Hide favicon & navbar on linkedin web page. Feel free to seek new oppotunities when you're at work. lol

  1. // ==UserScript==
  2. // @name Linkedin Enhancer-Logo&Favicon invisiable
  3. // @namespace Feioura
  4. // @author Feioura
  5. // @version 0.3
  6. // @description Enhance your LinkedIn experience with this script! Hide favicon & navbar on linkedin web page. Feel free to seek new oppotunities when you're at work. lol
  7. // @match https://www.linkedin.cn/*
  8. // @match https://www.linkedin.com/*
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. const hideElement = () => {
  15. const logoelement = document.querySelector('li-icon.ivm-view-attr__icon');
  16. if (logoelement) {
  17. logoelement.style.display = 'none'; // 设置样式隐藏元素
  18. }
  19.  
  20. const cardDiv = document.querySelector('div.profile-card');
  21. if (cardDiv) {
  22. cardDiv.style.display = 'none';
  23. }
  24. };
  25.  
  26.  
  27. hideElement();
  28. })();
  29.  
  30. //learn from adlered, change favicon & page title of linkedin to github.
  31. window.onload = function () {
  32. const fake_title = 'GitHub'
  33. const fake_icon = 'https://github.githubassets.com/favicon.ico'
  34. let link =
  35. document.querySelector("link[rel*='icon']") ||
  36. document.createElement('link')
  37. window.document.title = fake_title
  38. link.type = 'image/x-icon'
  39. link.rel = 'shortcut icon'
  40. link.href = fake_icon
  41. document.getElementsByTagName('head')[0].appendChild(link)
  42. }