iEMB+

Makes the new iEMB more tolerable

Stan na 24-01-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         iEMB+
// @namespace    http://yeoxingyee.ml/
// @version      2.0b1
// @description  Makes the new iEMB more tolerable
// @author       YXY
// @match        *://iemb.hci.edu.sg/Board/BoardList*
// @match        *://iemb.hci.edu.sg/Board/Detail*
// @match        *://iemb.hci.edu.sg/Board/content*
// @match        *://iemb.hci.edu.sg/*
// @grant        none
// ==/UserScript==
document.addEventListener("DOMContentLoaded", function(){
    console.log("iEMB+: Initialising...");
    var script = document.createElement("script");
    script.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js";
    document.getElementsByTagName("head")[0].appendChild(script);
    var scriptinject = document.createElement("script");
    scriptinject.src = "https://yeoxingyee.github.io/iembplus/iembp.js";
    document.getElementsByTagName("head")[0].appendChild(scriptinject);
    if(window.location.href.indexOf("iemb.hci.edu.sg") > -1){
        var x = $('.messageboard').length;
        $("#allMsg a em").text(x);
        var reader = '<button id="reader" onClick="autoread()"><a style="text-decoration: none; font-weight: normal;" href="#">Read All</a></button>';
        $(".unread_mess_bg").append(reader);
        var iframe = document.createElement("iframe");
        var verbose = document.createElement("div");
        verbose.id = "verbose";
        document.getElementsByTagName("body")[0].appendChild(verbose);
        $("#verbose").css("background","#000");
        $("#verbose").css("opacity", "0.3");
        $("#verbose").css("color", "white");
        $("#verbose").css("position", "fixed");
        $("#verbose").css("top", "0");
        $("#verbose").css("pointer-events", "none");
    }

});
window.onload=function(){
    linkstart();
    if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
        var mobilecss=document.createElement("link");
        mobilecss.href = "https://yeoxingyee.github.io/iembplus/iemb_mobile.css";
        mobilecss.type = "text/css";
        mobilecss.rel = "stylesheet";
        mobilecss.id = "mobilecss";
        document.getElementsByTagName("head")[0].appendChild(mobilecss);
    }
};