GMX standalone view

Set gmx / web.de option to open email in standalone window

Verze ze dne 30. 03. 2020. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         GMX standalone view
// @name:de      GMX Standalone-Ansicht
// @name:fr      GMX email - fenêtre séparée
// @namespace    https://github.com/Procyon-b
// @version      0.4
// @description  Set gmx / web.de option to open email in standalone window
// @description:de Stellen Sie die Option gmx / web.de so ein, dass E-Mails im eigenständigen Fenster geöffnet werden
// @description:fr Réactiver l'ouverture des emails dans une fenêtre popup (gmx / web.de)
// @author       Achernar
// @match        https://3c.gmx.net/mail/client/home*
// @match        https://3c.gmx.net/mail/client/folder*
// @match        https://3c.gmx.net/mail/client/search*
// @match        https://3c-bap.gmx.net/mail/client/home*
// @match        https://3c-bap.gmx.net/mail/client/folder*
// @match        https://3c-bap.gmx.net/mail/client/search*
// @include      https://3c-bs.gmx.tld/mail/client/home*
// @include      https://3c-bs.gmx.tld/mail/client/folder*
// @include      https://3c-bs.gmx.tld/mail/client/search*
// @match        https://3c.web.de/mail/client/home*
// @match        https://3c.web.de/mail/client/folder*
// @match        https://3c.web.de/mail/client/search*
// @match        https://3c-bap.web.de/mail/client/home*
// @match        https://3c-bap.web.de/mail/client/folder*
// @match        https://3c-bap.web.de/mail/client/search*
// @run-at document-body
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==

(function() {
"use strict";

const maxRetry=40;
var e, r, retry=maxRetry;

function toggle(ev) {
  if (!e) return;
  var v=(typeof ev == 'object')? !phx.vars.enableStandaloneView : ev;
  e.checked=v;
  phx.vars.enableStandaloneView=v;
  GM_setValue('option', v);
}


function addChk() {
  if (!(r=document.querySelector('.widget.menubar .button-container.left'))) {
    if (retry--) {
      setTimeout(addChk,10);
      }
    return;
    }
  retry=maxRetry;
  e=document.createElement('input');
  e.type='checkbox';
  e.id='standaloneView';
  e.title='Standalone view';
  e.style='margin-top: 6px;';
  r.appendChild(e);
  e.onclick=toggle;
  toggle(GM_getValue('option',true));
}

addChk();

const obs = new MutationObserver(function(mutL){
  for (let mut of mutL) {
    for (let el of mut.addedNodes) {
      if (el.classList && el.classList.contains('menubar')) {
        r=document.querySelector('.widget.menubar .button-container.left');
        addChk();
        return;
        }
      }
    }
  });

var t=document.querySelector('#panel-mail-table .panel-body form');
if (t) obs.observe(t, {subtree: false, childList: true, attributes: false} );


})();