commit d65d4834dd087eb8707dafeb17605d1a09208d8e Author: Simon Vieille Date: Sun Oct 21 00:27:14 2018 +0200 init diff --git a/main.js b/main.js new file mode 100644 index 0000000..3a0b1f4 --- /dev/null +++ b/main.js @@ -0,0 +1,40 @@ +try { + (function() { + var inputs = document.querySelectorAll('input[type="text"], input[autofocus], input[placeholder]'); + var inputsLength = inputs.length; + + for (var u = 0; u < inputsLength; u++) { + inputs[u].blur(); + } + + var profile = document.querySelector('.profile'); + + if (profile) { + var currentTab = profile.querySelector('.menu a.item.active'); + + if (currentTab && currentTab.getAttribute('href').indexOf('tab=activity') !== -1) { + var feeds = profile.querySelector('.feeds'); + var news = profile.querySelector('.feeds > .news'); + + if (feeds && news) { + var iframe = document.createElement('iframe'); + iframe.setAttribute('class', 'gitnet-activity-iframe'); + iframe.setAttribute('src', 'https://git.deblan.org/index2.php?username=' + document.querySelector('meta[property="og:title"]').getAttribute('content')); + iframe.setAttribute('frameborder', '0'); + + feeds.insertBefore(iframe, news); + } + } + } + + var stylusInterval = window.setInterval(function() { + var stylus = document.querySelector('style.stylus'); + + if (stylus && !stylus.getAttribute('data-clean')) { + stylus.innerHTML = ''; + stylus.setAttribute('data-clean', 1); + window.clearInterval(stylusInterval); + } + }, 100); + })(); +} catch(e) {} diff --git a/theme.css b/theme.css new file mode 100644 index 0000000..2419748 --- /dev/null +++ b/theme.css @@ -0,0 +1,48 @@ +.ui.top.menu { + color: #fff; + background: #2a2a2e; +} + +.ui.top.menu i, .ui.top.menu .sr-mobile-only, .ui.top.menu .mobile-only { + color: #fff; +} + +.ui.top.menu .dropdown .item i { + color: #333; +} + +.ui.top.menu.main a { + color: #fff; +} + +.ui.top.new-menu a.item.active, .ui.top.new-menu a.item:hover { + color: #333 !important; + background: none; +} + +.ui.top.tabular a.item.active, .ui.top.tabular a.item:hover { + color: #333 !important; + background: none; +} + +.ui.top.menu.main a.item.active, .ui.top.menu.main a.item:hover { + color: #fff !important; + background: #505058; +} + +@media screen and (max-width: 767px) { + .header-wrapper .tabs .item.active { + border-bottom: 1px solid #D4D4D5; + border-radius: .28571429rem !important; + } + + .gitnet-activity-iframe { + display: none; + } +} + +.gitnet-activity-iframe { + border: 0; + width: 100%; + height: 110px; +}