Make Google Tasks Great Again

Shows the embedded Google Tasks page on an own page

Version au 08/04/2019. Voir la dernière version.

// ==UserScript==
// @name         Make Google Tasks Great Again
// @author       CennoxX
// @contact      [email protected]
// @namespace    https://greasyfork.org/users/21515
// @description  Shows the embedded Google Tasks page on an own page
// @version      0.2
// @match        https://tasks.google.com/embed/?origin=https://mail.google.com
// @match        https://tasks.google.com/embed/list/~default
// @match        https://gsuite.google.com/learning-center/products/apps/keep-track-of-tasks/*
// @grant        GM.addStyle
// @license      MIT
// ==/UserScript==
(function() {
    'use strict';
    if(document.URL == "https://gsuite.google.com/learning-center/products/apps/keep-track-of-tasks/#!/" || (document.URL == "https://tasks.google.com/embed/list/~default" && document.title == "Error 404 (Nicht gefunden)!!1")){
        window.location.replace("https://tasks.google.com/embed/?origin=https://mail.google.com");
    } else {
        GM.addStyle(".EIlDfe{display:inherit!important}");//display body
        GM.addStyle(".CTxcDf{width:100%}");//add task full width
        GM.addStyle(".oXBvod{width:100%}");//done tasks full width
        GM.addStyle(".Sze5Fc{width:100%}");//done tasks full width

        GM.addStyle(".G4zhSc{width:35%}");//left column width 35 %
        GM.addStyle(".llhEMd{left:auto;width:65%}");//right column width 65%, not till the left border of the page

        //todo: hide old task if another one is opened
        //todo: hide old task if it is closed
    }
})();