Twitterのテキストを美咲フォントにする

    @@ -1,35 +1,20 @@ /* - * @title Twitterの名前部分を洒落たフォントにする - * @description Twitterのscreen_nameとuser_nameのフォントをGoogle Font APIから適当に引っ張ってきたフォントに変更します。 + * @title Twitterのテキストをを美咲フォントにする + * @description TwitterのフォントをGoogle Font APIを使って変更します。 * @include http://twitter.com/ * @license MIT License - * @require + * @require jQuery + * @require http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js * @private */ - -(function(api){ - var api2 = api; - api.type = api2.type = "text/javascript"; - api.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"; - api2.src = "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"; - document.body.appendChild(api); - document.body.appendChild(api2); - if(location.href.indexOf('http://twitter.com/') != -1){ - setTimeout(function(){ - if(!window.jQuery || !window.WebFont) arguments.callee; - else { - WebFont.load({ - google:{ - families: ['Lobster', 'Yanone Kaffeesatz'] - } - }); - $('.screen-name').css('font-family', 'Lobster'); - $('.username').css('font-family', 'Yanone Kaffeesatz'); - $('a.screen-name, a.username').css({ - 'font-weight': 'bold', - 'font-size': '120%' - }); - } - },100); +WebFont.load({ + custom: { + families: ['MisakiGothic_Outline'],urls: [ 'http://lab.slackl.info/font/MisakiGothic_Outline.css'] + }, + active: function() { + $('*').css({ + 'font-family' : 'MisakiGothic_Outline', + 'font-size' : '8px' + }); } -})(document.createElement("script")); +});
  • /*
     * @title Twitterのテキストをを美咲フォントにする
     * @description TwitterのフォントをGoogle Font APIを使って変更します。
     * @include http://twitter.com/
     * @license MIT License
     * @require jQuery
     * @require http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js
     * @private
     */
    WebFont.load({
      custom: {
      families: ['MisakiGothic_Outline'],urls: [ 'http://lab.slackl.info/font/MisakiGothic_Outline.css']
      },
      active: function() {
        $('*').css({
          'font-family' : 'MisakiGothic_Outline',
          'font-size'   : '8px'
        });
      }
    });
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/05/20 18:32:26 - 2010-05-20
  2. 2010/05/20 18:24:39 - 2010-05-20
  3. 2010/05/20 18:19:28 - 2010-05-20
  4. 2010/05/20 18:18:19 - 2010-05-20
  5. 2010/05/20 18:16:23 - 2010-05-20
  6. 2010/05/20 18:15:54 - 2010-05-20
  7. 2010/05/20 18:10:32 - 2010-05-20
  8. 2010/05/20 16:37:06 - 2010-05-20
  9. 2010/05/20 16:35:30 - 2010-05-20
  10. 2010/05/20 16:34:29 - 2010-05-20
  11. 2010/05/20 16:32:08 - 2010-05-20
  12. 2010/05/20 16:31:26 - 2010-05-20
  13. 2010/05/20 16:30:22 - 2010-05-20
  14. 2010/05/20 16:29:24 - 2010-05-20
  15. 2010/05/20 16:27:53 - 2010-05-20
  16. 2010/05/20 16:24:47 - 2010-05-20
  17. 2010/05/20 16:19:33 - 2010-05-20
  18. 2010/05/20 16:19:05 - 2010-05-20
  19. 2010/05/20 16:18:28 - 2010-05-20
  20. 2010/05/20 16:17:05 - 2010-05-20
  21. 2010/05/20 16:12:04 - 2010-05-20
  22. 2010/05/20 16:05:22 - 2010-05-20
  23. 2010/05/20 16:03:24 - 2010-05-20
  24. 2010/05/20 16:03:11 - 2010-05-20
  25. 2010/05/20 15:56:44 - 2010-05-20
  26. 2010/05/20 15:56:28 - 2010-05-20