├── AvenirLTStd-Light.woff ├── content.js ├── icon.png ├── index.html ├── logo.jpg ├── logo.svg ├── manifest.json ├── popup.html ├── popup.js ├── repository-open-graph-template.png ├── search.png ├── sus-github-main.css ├── sus-github.css └── vue.js /AvenirLTStd-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micah5/suspicious-github-themer/4053e2dbd49c0f544f57f9c58c232a48b19a7bf0/AvenirLTStd-Light.woff -------------------------------------------------------------------------------- /content.js: -------------------------------------------------------------------------------- 1 | /* Listen for messages */ 2 | chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) { 3 | /* If the received message has the expected format... */ 4 | if (msg.text && (msg.text == "toggle_on")) { 5 | on = true 6 | //const susHeader = document.getElementsByClassName("Header")[0].cloneNode(true) 7 | //document.getElementsByClassName("Header")[0].style.display = 'none' 8 | turnOn() 9 | document.cookie = `sus-github-themer=${on}` 10 | sendResponse(true) 11 | } else if (msg.text && (msg.text == "get_on")) { 12 | sendResponse(on) 13 | } else if (msg.text && (msg.text == "toggle_off")) { 14 | on = false 15 | document.cookie = `sus-github-themer=${on}` 16 | sendResponse(on) 17 | } 18 | }); 19 | 20 | let on = false; 21 | 22 | function check_cookie_name(name) { 23 | console.log('document.cookie', document.cookie) 24 | var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)')) 25 | if (match) return(match[2]) 26 | else return null 27 | } 28 | 29 | const cookieName = this.check_cookie_name('sus-github-themer') 30 | on = (cookieName == 'true') 31 | if (on) { 32 | turnOn() 33 | } 34 | 35 | function turnOn() { 36 | const susHeader = document.getElementsByClassName("Header")[0] 37 | susHeader.className += " sus-Header" 38 | const newLogo = document.createElement("img") 39 | newLogo.setAttribute('src', 'https://raw.githubusercontent.com/micah5/suspicious-github-themer/master/logo.jpg') 40 | newLogo.setAttribute('class', 'sus-header-image') 41 | susHeader.getElementsByClassName("Header-link")[0].replaceWith(newLogo) 42 | susHeader.getElementsByClassName("js-site-search-form")[0].className += " sus-js-site-search-form" 43 | //document.body.className += " sus-body" 44 | const susSubheader = susHeader.getElementsByTagName("nav")[0].cloneNode(true) 45 | susHeader.getElementsByTagName("nav")[0].setAttribute('style', 'display:none !important') 46 | susSubheader.className += " sus-subheader" 47 | susHeader.parentNode.insertBefore(susSubheader, susHeader.nextSibling) 48 | susHeader.getElementsByClassName("header-search-key-slash")[0].src = 'https://raw.githubusercontent.com/micah5/suspicious-github-themer/master/search.png' 49 | susHeader.getElementsByClassName("header-search-key-slash")[0].className += ' sus-search' 50 | url = window.location.href 51 | page = url.substr(url.lastIndexOf('/') + 1) 52 | console.log(page) 53 | switch (page) { 54 | case 'pulls': susSubheader.getElementsByTagName("a")[0].className += " active"; break 55 | case 'issues': susSubheader.getElementsByTagName("a")[1].className += " active"; break 56 | case 'marketplace': susSubheader.getElementsByTagName("a")[3].className += " active"; break 57 | case 'explore': susSubheader.getElementsByTagName("a")[4].className += " active"; break 58 | } 59 | var link = document.createElement("link"); 60 | link.href = chrome.extension.getURL("sus-github-main.css"); 61 | link.type = "text/css"; 62 | link.rel = "stylesheet"; 63 | document.getElementsByTagName("head")[0].appendChild(link); 64 | } 65 | 66 | /* 67 | let startTime = null; 68 | 69 | function getId() { 70 | var url_string = window.location.href 71 | var url = new URL(url_string); 72 | var id = url.searchParams.get("v"); 73 | return id 74 | } 75 | 76 | function appendButton(elementId, url){ 77 | var buttonEl = document.createElement("a"); 78 | buttonEl.id = 'record-ad-time' 79 | buttonEl.style.cursor = "pointer" 80 | buttonEl.onclick = () => { 81 | var thisButton = document.getElementById('record-ad-time'); 82 | if (thisButton.innerText == "🚫") { 83 | let id = getId() 84 | thisButton.getElementsByTagName('span')[0].innerText = '👌' 85 | startTime = document.getElementsByClassName("ytp-time-current")[0].innerHTML 86 | } else if (thisButton.innerText == "👌") { 87 | let id = getId() 88 | thisButton.getElementsByTagName('span')[0].innerText = '☁️' 89 | let endTime = document.getElementsByClassName("ytp-time-current")[0].innerHTML 90 | axios.post('https://sponsorship-remover.herokuapp.com/add_time', { 91 | startTime: startTime, 92 | endTime: endTime, 93 | id: id 94 | }) 95 | .then(async function (response) { 96 | startTime = null 97 | thisButton.getElementsByTagName('span')[0].innerText = '✅' 98 | await new Promise(resolve => setTimeout(resolve, 1000)); 99 | thisButton.getElementsByTagName('span')[0].innerText = '🚫' 100 | }) 101 | .catch(async function (error) { 102 | startTime = null 103 | thisButton.getElementsByTagName('span')[0].innerText = '❎' 104 | await new Promise(resolve => setTimeout(resolve, 1000)); 105 | thisButton.getElementsByTagName('span')[0].innerText = '🚫' 106 | }); 107 | } 108 | }; 109 | var buttonTextEl = document.createElement("span"); 110 | buttonTextEl.innerText = "🚫"; 111 | buttonTextEl.style.marginLeft = "10px"; 112 | buttonEl.appendChild(buttonTextEl); 113 | var referenceNode = document.getElementsByClassName('ytp-time-display')[0] 114 | //referenceNode.parentNode.insertBefore(buttonEl, referenceNode.nextSibling); 115 | referenceNode.appendChild(buttonEl); 116 | } 117 | */ 118 | 119 | //appendButton("something", "/news_events/") 120 | /* 121 | console.log('hi', document.readyState) 122 | document.body.style.background = 'yellow'; 123 | if( document.readyState === 'complete' || document.readyState === 'interactive') { 124 | console.log( 'document is already ready, just execute code here' ); 125 | myInitCode(); 126 | } else { 127 | console.log('document not ready yet') 128 | document.addEventListener('DOMContentLoaded', function () { 129 | console.log( 'document was not ready, place code here' ); 130 | myInitCode(); 131 | }); 132 | } 133 | 134 | function myInitCode() { 135 | console.log('dom loaded') 136 | var divs = document.querySelectorAll('div'); 137 | for (var i = 0; i < divs.length; i++) { 138 | divs[i].addEventListener('click', () => { 139 | console.log('clicked') 140 | }); 141 | } 142 | } 143 | */ 144 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micah5/suspicious-github-themer/4053e2dbd49c0f544f57f9c58c232a48b19a7bf0/icon.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
0:05 / 7:54
4 | 5 |
red
6 |
blue
7 |
green
8 |
yellow
9 | 10 | -------------------------------------------------------------------------------- /logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micah5/suspicious-github-themer/4053e2dbd49c0f544f57f9c58c232a48b19a7bf0/logo.jpg -------------------------------------------------------------------------------- /logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Suspicious Github Themer", 4 | "version": "1.0", 5 | "content_scripts": [{ 6 | "matches": ["*://*.github.com/*"], 7 | "css": ["sus-github.css"], 8 | "js": ["content.js"] 9 | }], 10 | "browser_action": { 11 | "default_icon": "icon.png", 12 | "default_title": "Suspicious Github Themer", 13 | "default_popup": "popup.html" 14 | }, "web_accessible_resources": [ 15 | "sus-github-main.css" 16 | ], 17 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", 18 | "permissions": ["activeTab", "tabs"] 19 | } 20 | -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Suspicious Github Themer 5 | 60 | 61 |
62 |
63 | 66 | 67 | 87 | 88 | 89 | 92 | 95 |
96 |
97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /popup.js: -------------------------------------------------------------------------------- 1 | /*document.getElementById('recordTime').onclick = () => { 2 | chrome.tabs.query({"active": true, "lastFocusedWindow": true}, (tabs) => { 3 | tabURL = tabs[0].url; 4 | let tab = tabs[0] 5 | this.times.push('kk slider') 6 | chrome.tabs.sendMessage(tab.id, { text: "report_back" }, 7 | (element) => { 8 | alert("button was clicked yeeessss " + element); 9 | }); 10 | }); 11 | };*/ 12 | 13 | new Vue({ 14 | el: '#app', 15 | data: { 16 | on: false 17 | }, 18 | mounted: function () { 19 | console.log('started', document) 20 | chrome.tabs.query({"active": true, "lastFocusedWindow": true}, (tabs) => { 21 | let tab = tabs[0] 22 | chrome.tabs.sendMessage(tab.id, { text: "get_on" }, 23 | (res) => { 24 | console.log('got on', res) 25 | this.on = res 26 | console.log('huh', this.on) 27 | }); 28 | }); 29 | /*cookieName = this.check_cookie_name('sus-github-themer') 30 | this.on = (cookieName == 'true') 31 | if (this.on) { 32 | this.toggleOn() 33 | }*/ 34 | }, 35 | methods: { 36 | toggleOn: function() { 37 | chrome.tabs.query({"active": true, "lastFocusedWindow": true}, (tabs) => { 38 | let tab = tabs[0] 39 | chrome.tabs.sendMessage(tab.id, { text: "toggle_on" }, 40 | (res) => { 41 | console.log('element', res) 42 | if (res == true) { 43 | this.on = true 44 | } 45 | //document.cookie = `sus-github-themer=${this.on}` 46 | }); 47 | }); 48 | }, 49 | toggleOff: function() { 50 | console.log('toggle off') 51 | this.on = false 52 | chrome.tabs.query({"active": true, "lastFocusedWindow": true}, (tabs) => { 53 | let tab = tabs[0] 54 | chrome.tabs.sendMessage(tab.id, { text: "toggle_off" }, 55 | (res) => { 56 | console.log('element', res) 57 | //document.cookie = `sus-github-themer=${this.on}` 58 | }); 59 | }); 60 | }, 61 | openLink: function(url) { 62 | chrome.tabs.create({ url: url }) 63 | }, 64 | check_cookie_name: function(name) { 65 | var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)')) 66 | if (match) return(match[2]) 67 | else return null 68 | } 69 | } 70 | }) 71 | -------------------------------------------------------------------------------- /repository-open-graph-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micah5/suspicious-github-themer/4053e2dbd49c0f544f57f9c58c232a48b19a7bf0/repository-open-graph-template.png -------------------------------------------------------------------------------- /search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micah5/suspicious-github-themer/4053e2dbd49c0f544f57f9c58c232a48b19a7bf0/search.png -------------------------------------------------------------------------------- /sus-github-main.css: -------------------------------------------------------------------------------- 1 | .subnav-item.selected, .subnav-item.selected:focus, .subnav-item.selected:hover { 2 | background-color: #F2A243; 3 | border-color: #F2A243; 4 | } 5 | 6 | a { 7 | color: #F2A243; 8 | } 9 | 10 | .Box-header { 11 | background-color: #000000; 12 | } 13 | 14 | .blankslate { 15 | background-color: #000000; 16 | } 17 | 18 | .repohead.experiment-repo-nav { 19 | background-color: #000; 20 | } 21 | 22 | .reponav-item { 23 | border-radius:0 !important; 24 | border: 0; 25 | } 26 | 27 | .reponav-item .octicon { 28 | color:white; 29 | } 30 | 31 | .reponav-item.selected { 32 | border-top:3px solid transparent; 33 | border-color:#e36209 #e1e4e8 transparent; 34 | } 35 | 36 | .reponav-item.selected:focus, .reponav-item.selected:hover{ 37 | color:#000; 38 | border-top:3px solid transparent; 39 | border-color:#e36209 #e1e4e8 transparent; 40 | } 41 | 42 | .reponav-item:focus, .reponav-item:hover { 43 | color:#fff; 44 | border-top:3px solid transparent; 45 | border-color:#e36209 transparent transparent transparent; 46 | } 47 | 48 | .pagehead { 49 | border-color: #fff; 50 | } 51 | 52 | .file-navigation details .btn { 53 | background-color: rgb(15, 15, 15); 54 | background-image: none; 55 | border:1px solid #F2A243; 56 | color:#fff; 57 | } 58 | 59 | .file-navigation .new-pull-request-btn { 60 | background-color: rgb(15, 15, 15); 61 | background-image: none; 62 | border:1px solid #F2A243; 63 | color:#fff; 64 | } 65 | 66 | .file-navigation .BtnGroup .btn { 67 | background-color: rgb(15, 15, 15); 68 | background-image: none; 69 | border:1px solid #F2A243; 70 | color:#fff; 71 | } 72 | 73 | .branch-infobar { 74 | background-color: rgb(15, 15, 15); 75 | background-image: none; 76 | border:1px solid #F2A243; 77 | border-color:#F2A243 #F2A243 transparent #F2A243; 78 | color:#fff; 79 | } 80 | 81 | .reponav-item { 82 | color:#fff; 83 | } 84 | 85 | .stats-switcher-wrapper .numbers-summary .nolink, .stats-switcher-wrapper .numbers-summary a, .stats-switcher-wrapper .numbers-summary a .text-emphasized { 86 | color:#fff; 87 | } 88 | 89 | .repository-content .text-gray-dark { 90 | color:#fff !important; 91 | } 92 | 93 | .commit-tease { 94 | border:1px solid #F2A243; 95 | border-radius:0 !important; 96 | background-color: #000; 97 | color: #fff; 98 | } 99 | 100 | .commit-tease .AvatarStack-body { 101 | background-color: #000; 102 | } 103 | 104 | .team-mention, .user-mention { 105 | color: #fff; 106 | } 107 | 108 | table.files { 109 | border-color:#F2A243; 110 | } 111 | 112 | table.files tr { 113 | background-color:#000; 114 | } 115 | 116 | table.files td { 117 | border-color:#F2A243; 118 | } 119 | 120 | table.files td.icon { 121 | color:#F2A243; 122 | } 123 | 124 | table.files td.message a { 125 | color: #fff !important; 126 | } 127 | 128 | table.files tr.navigation-focus td, table.files tr[aria-selected=true] td.message a { 129 | color:#000 !important; 130 | } 131 | 132 | table.files td.age span { 133 | color: #fff !important; 134 | } 135 | 136 | table.files tr.navigation-focus td, table.files tr[aria-selected=true] td.age span { 137 | color:#000 !important; 138 | } 139 | 140 | body { 141 | background-color: #000000; 142 | } 143 | 144 | h1, h2, h3, h4, h5, h6, p { 145 | color: #ffffff; 146 | } 147 | -------------------------------------------------------------------------------- /sus-github.css: -------------------------------------------------------------------------------- 1 | .sus-body { 2 | font-family: Arial,Helvetica,sans-serif; 3 | font-size: 12px; 4 | background-color: black; 5 | color: white; 6 | } 7 | 8 | .sus-Header { 9 | background-color: #1A1A1A !important; 10 | border-top: 1px solid #555; 11 | border-bottom: 1px solid #242424; 12 | } 13 | 14 | .sus-subheader > .Header-link { 15 | text-transform: uppercase; 16 | font-size: 11px; 17 | height: 100%; 18 | margin: auto; 19 | text-align: center; 20 | width: 100%; 21 | line-height: 38px; 22 | } 23 | 24 | .sus-subheader > .Header-link:hover { 25 | background-color: #191919; 26 | color: white; 27 | } 28 | 29 | .sus-subheader > .Header-link.active { 30 | border-bottom: 2px solid #F2A243; 31 | } 32 | 33 | .sus-subheader { 34 | background-color: #0f0f0f; 35 | border-bottom: 1px solid #1b1b1b; 36 | height: 38px; 37 | } 38 | 39 | .sus-js-site-search-form { 40 | background: linear-gradient(to right, #363636 0%,#363636 88%,#000000 50%,#F2A243 50%,#F2A243 100%); 41 | font-style: italic; 42 | } 43 | 44 | .sus-nav { 45 | display: none !important; 46 | } 47 | 48 | .sus-header-image { 49 | width: 10vw; 50 | } 51 | 52 | .sus-search { 53 | width: 2rem; 54 | padding: 10px; 55 | transform: translate(20%, 0%); 56 | } 57 | --------------------------------------------------------------------------------