odyssey-scripts/itchio.js

37 lines
1.1 KiB
JavaScript

// itch.io CSS fixes
// version 1.1
// 2022-11-17
// Copyright (c) 2021-2022 Created by Georgios Sokianos
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// ==UserScript==
// @name itch.io CSS fixes
// @namespace none
// @description Fixes css in itch.io
// @include https://*.itch.io/*
// @include https://itch.io/*
// @version $VER: itch.io CSS fixes 1.1 (17.11.2022)
// @url https://ko-fi.com/walkero
// ==/UserScript==
var css = ' \
.header_widget .primary_header > * { display: inline-block; } \
div.left_col.column { display:inline-block !important; width: 58% !important; vertical-align:top; } \
div.right_col.column { display:inline-block !important; width: 38% !important; vertical-align:top; margin-left: 4%; } \
';
var head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
head.appendChild(style);
style.type = 'text/css';
if (style.styleSheet){
// This is required for IE8 and below.
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}