keage / Saitamaar

AA 表示用フォント Saitamaar を AA っぽい要素に適用するスクリプト
7 stars 6 forks source link

Proposition of Greasemonkey version #1

Open aycabta opened 9 years ago

aycabta commented 9 years ago

I'm using your bookmarklet for AA reading, so I wanna use anywhere more easily.

I think to use Greasemonkey, and wrote sample script that uses the bookmarklet code:

// ==UserScript==
// @name         Saitamaar
// @version      0.0.0
// @grant GM_registerMenuCommand
// ==/UserScript==

(function() {
    GM_registerMenuCommand("Saitamaar", function() {
        var e = document.createElement('script');
        e.setAttribute('src','http://keage.sakura.ne.jp/fonts/Saitamaar.js');
        e.setAttribute('charset','utf-8');
        document.getElementsByTagName('head')[0].appendChild(e);
    });
})();

This works well, but I want auto-update when version up. I use OpenUserJS at other times. Some problems here:

So I think to use GitHub Pages for hosting latest Saitamaar.js on gh-pages branch that follows up master branch by merging, it's for loading by Greasemonkey. And GitHub webhook notifies OpenUserJS of Greasemonkey script above updating. It can take all propositions by Pull Request on GitHub.

If you update Saitamaar.js on this repository to the latest code, I will do various matters above by Pull Request to this repository. How about it?

keage commented 9 years ago

Thanks for a nice proposal. I just updated Saitamaar.js on this repository to the latest code. :)

aycabta commented 9 years ago

Yaruo walking the Mokyu

Now, I forked this repository and create gh-pages branch aycabta/Saitamaar/tree/gh-pages, and it contains Greasemonkey script; it's at http://aycabta.github.io/Saitamaar/Saitamaar_greasemonkey.user.js. It's just for test.

Now some problems are threre, compilation: