Skip to content

Instantly share code, notes, and snippets.

@fujieda
Last active March 29, 2021 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fujieda/d475a6bc6936fd3fc89a156fbe167d48 to your computer and use it in GitHub Desktop.
Save fujieda/d475a6bc6936fd3fc89a156fbe167d48 to your computer and use it in GitHub Desktop.
Yahooメールのボディの行間を変えるTampermonkeyスクリプト
// ==UserScript==
// @name Yahoo Mail Line Hight
// @namespace https://roundwide.com/
// @version 0.1
// @description Set the line height of the e-mail body on Yahoo Mail.
// @author Kazuhiro Fujieda <fujieda@roundwide.com>
// @match https://*.mail.yahoo.co.jp/*
// @grant none
// ==/UserScript==
function setLineHeight() {
var msg = document.getElementsByClassName('msg-body');
for (var i = 0; i < msg.length; i++) {
msg[i].style.lineHeight = "18pt";
}
}
(function() {
'use strict';
const target = document.body;
if (target == null) {
return;
}
const observer = new MutationObserver(setLineHeight);
const config = { subtree: true, childList: true };
observer.observe(target, config);
})();
/*
Copyright (c) 2021 Kazuhiro Fujieda <fujieda@roundwide.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment