25
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「今どんな気持ち?」をアレする user script

Last updated at Posted at 2012-12-06

Facebook が急にうざくなったので

太一

困って書いた。

太一after

kokubun.user.js
// ==UserScript==
// @name ねえねえ今どんな気持ち?
// @namespace http://udzura.jp/kokubun
// @description 国分太一fier
// @include https://www.facebook.com/*
// @version 0.0.1.20121205
// ==/UserScript==

(function () {
  function pingTaichi () {
    var elms = document.getElementsByTagName('textarea');
    if(elms.length != 0) {
      for(i = 0; i < elms.length; i++ ) {
        var elm = elms[i];
        if(elm.getAttribute('placeholder') === '今どんな気持ち?') {
          elm.setAttribute('placeholder', 'ねえねえ今どんな気持ち?');
          elm.value = 'ねえねえ今どんな気持ち?';
        }
      }
    }
  }
  setInterval(pingTaichi, 300);
})();

クロ〜ムとファイヤホックスで動いてた気がする。

install

fork

文言を変えたい時は

をforkしてください

document.getElementsByTagName('textarea')

が、 forEach を持ってなくて、代わりに iterator() と言うのがあったので使っていたんだけど、FireFoxでしか動かなかった

25
26
6

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?