DevRant-MOD

Useful MODs for DevRant

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         DevRant-MOD
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Useful MODs for DevRant 
// @author       Himalay
// @match        https://www.devrant.io/*
// @grant        none
// ==/UserScript==

(function() {
  "use strict";
  document.querySelector("style").innerHTML += `* {
        user-select: text !important;
        -moz-user-select: text !important;
        -webkit-user-select: text !important;
    }
    .rant-lightbox {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        z-index: 9999;
        padding: 10px;
    }
    .rant-lightbox img {
        max-height: 90vh;
    }
    .rant-lightbox a {
        margin-top: 10px;
        font-size: 1.5em;
    }
    .body-col1 {
        display: none;
    }
    .body-col2, .rantlist-bg, .rantlist-content-col, .rantlist-title-text  {
        width: 100%;
    }
    .rantlist-content-col {
        width: calc(100% - 50px);
    }
    .rant-image {
    overflow-y: auto;
    }
    .rant-image img {
        max-width: 100%;
    }
    .addrant-btn {
        margin-left: 0;
    }`;
  document.addEventListener("click", e => {
    if (e.target.parentElement.classList.contains("rant-image")) {
      document.body.innerHTML += `<div class="rant-lightbox" onclick="this.parentElement.removeChild(this);"><img src="${e
        .target.src}" /><a href="${e.target
        .src}" download="${e.target.src.split("/").pop()}">?</a></div>`;
      e.preventDefault();
      e.stopPropagation();
    }
  });
})();