Skip to content

Instantly share code, notes, and snippets.

@coke12103
Last active July 15, 2020 09:40
Show Gist options
  • Save coke12103/f08524051129932ce3ad5e37168bd59f to your computer and use it in GitHub Desktop.
Save coke12103/f08524051129932ce3ad5e37168bd59f to your computer and use it in GitHub Desktop.
Misskeyのナビゲーションバーを下に移動するやつ(m544に最適化されたバージョン)
// ==UserScript==
// @name Misskey bottom bar
// @namespace coke12103
// @description Misskeyのナビゲーションバーを下に移動する
// @include *
// @version 1.0.0
// @match https://mk.iaia.moe/*
// @author coke12103
// ==/UserScript==
var _css = ".header:nth-child(2){\n bottom:0!important;\n top:inherit!important;\n}\n.header>.main>.backdrop{\n background: var(--secondary) !important;\n}\n#app{\n padding-top: 48px!important;\n}\n.account .menu,\n.notifications > .pop,\n.clock > .content{\n bottom:56px!important;\n top:inherit!important;\n}\n.content .normal:not(.icon){\n height:calc(-48px+100vh)!important;\n padding-top:-48px!important;\n border-top-width:0px!important;\n border-top-style:solid!important;\n margin-top:-55px!important;\n padding-bottom:0px!important;\n}\n.content div .main:nth-child(1){\n margin:-24px auto auto auto!important;\n}\n.content .left,.content .right{\n margin-top:-24px!important;\n}\n\n.note > .article > .main > .body > .content > .renote > div{\n padding: 35px 10px!important;\n}\n\n.mk-stream-indicator,\n.disconnect-notify{\n bottom: calc(8px + 48px) !important;\n}\n\n.nav > ul > li.active > a{\n border-bottom: none !important;\n border-top: 3px solid var(--primary);\n}\n\n.account > .header > .username > svg{\n display: none;\n}\n\n.account > .menu::before,\n.account > .menu::after,\n.notifications > .pop::after,\n.notifications > .pop::before{\n display: none !important;\n}\n\n.main > .main{\n padding-bottom: calc(48px + 18px) !important;\n}\n\n.mk-settings > .pages{\n padding-bottom: calc(48px + 6px);\n}";
(() => {
try{
const blob = new Blob([_css], {type: "text/css"});
const src = URL.createObjectURL(blob);
const style = Object.assign(document.createElement('link'),{
id: 'misskey-bottom-bar',
rel: 'stylesheet',
href: src
});
document.head.append(style);
}catch(e){
console.warn('Misskey bottom bar load failed!', e);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment