Nitter Gallery

replace nitter user media tab with gallery

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Nitter Gallery
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  replace nitter user media tab with gallery
// @author       You
// @include      /^(https?:\/\/)?nitter\.([A-Za-z]+){2,3}\/([.,0-9A-Za-z]+)\/media/
// @include      /^(https?:\/\/)?nitter\.([A-Za-z]+)\.([A-Za-z]+){2,3}\/([.,0-9A-Za-z]+)\/media/
// @icon         https://www.google.com/s2/favicons?domain=stackoverflow.com
// @grant        none
// ==/UserScript==
function GM_addStyle(css) {
  const style = document.getElementById("GM_addStyleBy8626") || (function() {
    const style = document.createElement('style');
    style.type = 'text/css';
    style.id = "GM_addStyleBy8626";
    document.head.appendChild(style);
    return style;
  })();
  const sheet = style.sheet;
  sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length);
}

//demo :
GM_addStyle(".tweet-body {display:flex;flex-direction: row;flex-grow:1;flex-wrap: wrap;justify-content:flex-start;margin: auto;overflow:hidden;}");
GM_addStyle(".tweet-header, .tweet-content, .tweet-link, .tweet-stats {max-height:1px;max-width:1px;position:absolute;overflow:hidden;}");
GM_addStyle(".attachments {max-height:700px;height:auto;width:auto;max-width:700px;overflow:visible;padding: 0 0 0 0;margin:auto;}");
GM_addStyle(".still-image img {flex-basis:0px;}");
GM_addStyle(".timeline-item {padding: 0 0 2px 0;margin: auto;}");
GM_addStyle(".timeline {padding: 0 0 0 0;margin: 0 0 0 0;}");

const sheet = document.getElementById("GM_addStyleBy8626").sheet,
  rules = (sheet.rules || sheet.cssRules);

for (let i=0; i<rules.length; i++) {
  document.querySelector("pre").innerHTML += rules[i].cssText + "\n";
}