FreeLists Email Controllers

Add mailto navigation URIs to FreeLists, to subscribe or unsubscribe via an Email client, instead of HTML interface.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript== 
// @author      Schimon Jehudah, Adv.
// @description Add mailto navigation URIs to FreeLists, to subscribe or unsubscribe via an Email client, instead of HTML interface.
// @copyright   2025, Schimon Jehudah (http://schimon.i2p)
// @license     MIT
// @name        FreeLists Email Controllers
// @namespace   i2p.schimon.freelists
// @match       http://freelists.org/list/*
// @match       http://www.freelists.org/list/*
// @match       https://freelists.org/list/*
// @match       https://www.freelists.org/list/*
// @tag         mailing-list
// @version     2025.12.29
// @homepageURL https://greasyfork.org/scripts/560597-freelists-email-controllers
// @supportURL  https://greasyfork.org/scripts/560597-freelists-email-controllers/feedback
// ==/UserScript==

var mailingList = location.pathname.split("/").pop();
var elementUl = document.querySelector("div.container > div.row > div > ul");
var actions = [
  { text: "Subscribe by email", subject: "subscribe" },
  { text: "Unsubscribe by email", subject: "unsubscribe" }
];

for (var i = 0; i < actions.length; i++) {
  var listItem = document.createElement("li");
  var anchor = document.createElement("a");

  anchor.textContent = actions[i].text;
  anchor.href = "mailto:" + mailingList + "[email protected]?Subject=" + actions[i].subject;

  listItem.appendChild(document.createTextNode("» "));
  listItem.appendChild(anchor);
  elementUl.appendChild(listItem);
}