事の発端は 試行錯誤 というエントリでした。あれこれポップアップのクールさが非常に気に入ったので自分用に Firefox の拡張にしてどのページでも表示できないものか
という言葉に出来るかもなんて思ってしまったのがいけなかった。身の程を知れというのだ。私よ。
最初に考えたのが JavaScript Actions で埋め込む方法です。以前CSSを読み込むための要素を生成してユーザCSSを利用する方法を 書いた のでその要領でCSSファイルとJSファイルを読み込んでやれば良いのではないかという発想です。しかしそれ以前にscript要素を生成する為の書き方がわからない。仕方がないので Traversing the HTML Table with JavaScript and DOM interfaces を読みながら勉強しました。これを応用するのに相当の時間が掛かりました。それで出来上がったのが以下のソース
var mybody=document.getElementsByTagName("head").item(0);
myjs = document.createElement("script");
mybody.appendChild(myjs);
myjs.setAttribute("src","http://raraweb.fc2web.com/ArekorePopup.js");
myjs.setAttribute("type","text/javascript");
あまり理解していないのだけれどこれで動くのだから良しとします。このスクリプトを引き下げていざ JavaScript Actions に導入しようと試みたのですが敢無く失敗。まだ試行すべき事は残っていますが、疲れてきたので greasemonkey を利用してみる事にしました。しかしここでも greasemonkey用のスクリプトの書き方がわからないという問題が発生。また勉強のし直しなのかと諦めようと思いましたが、とりあえずそのまま入れてみようと実験。書き方は パソコン遊戯さんの User JavaScript for Mozilla Firefox をそのまま参考にさせて頂きました。それで書き上げたのが以下です。
// ==UserScript==
// @name DokodemoArekorePopup
// @namespace http://harmony.blog5.fc2.com/
// @description You can achieve 'ArekorePopup' anywhere.
// @include *
// ==/UserScript==
(function() {
if(document.all)
document.createStyleSheet('http://raraweb.fc2web.com/ArekorePopup.css');
else if(document.styleSheets){
var nLink=document.createElement('LINK');
nLink.rel="StyleSheet";
nLink.type="text/css";
nLink.href="http://raraweb.fc2web.com/ArekorePopup.css";
var oHEAD=document.getElementsByTagName('HEAD').item(0);
oHEAD.appendChild(nLink);
}
var mybody=document.getElementsByTagName("head").item(0);
myjs = document.createElement("script");
mybody.appendChild(myjs);
myjs.setAttribute("src","http://raraweb.fc2web.com/ArekorePopup.js");
myjs.setAttribute("type","text/javascript");
})();
先頭は greasemonkey 用の書式です。続くのが <link rel="StyleSheet" href="" type="text/css"> という要素を生成し挿入する為の物で、最後の部分が前述したスクリプト(<script src="" type="text/javascript"></script>)を埋め込む為の物です。簡単に説明すると あれこれポップアップの設置マニュアル に書かれているとりあえず設置のHTML記述例を全てのページに挿入させるためのスクリプトです。このスクリプトを greasemonkey にインストールすれば殆どのページであれこれポップアップを動作させる事が可能です。ご利用になられる方は上記ソースをメモ帳などのテキストエディタに写した後に、強調部分のURIをご自分であれこれポップアップの一式を置いた場所に書き換え、適当な名前(DAP.user.js)を付けて保存し、それを greasemonkey にインストールして下さい。
『はてブ』のコメントで知りました。本当にごめんなさい。一度でも 検索してみるべき でした。申し訳ございません。
こんばんは!
なるほど外部サーバーに置けばいいわけですねっ!
私も最初は Greasemonkey で出来ないかと思っていたのですが、ファイルを外部サーバーに置くということが頭になかったため拡張で出来ないかとやっていたのです。
おかげさまで、どこでもあれこれポップアップが表示できるようになりました!ありがとうございました!
「どこでもあれこれポップアップ」を拡張化し、拡張に同梱した「あれこれポップアップ」を読み込ませることが出来ました。
これで拡張をインストールするだけで「どこでもあれこれポップアップ」を使えます。
参考にその拡張を送りたいと思いますので、よかったらメール下さい。折り返しファイルを添付して送ります。
どうもはじめまして。
拡張化とは素晴らしいですね。
「欲しい!」と手を挙げて直ぐにメールをしようと思ったのですが、その前に『あれこれポップアップ』の作者様である ありみかさとみさん に確認のメールを出しましたので、その返事を待ってからメールを送らせて頂こうと思っています。
拡張として(再)配布できるとしたらとても喜ばしい事と思います。
As I have experienced on the lifeless clay.
No, no- I'm improving, but animals that had happened to know the Deerslayer, himself, unconscious that he came round in a camp or a sarcumvention never shuts them ag'in in the direction of the dead.
Most of her sailing; but I have often thought of pleasure, in fact, for a steam-boat, and told his generation and race that the true course, there was no reply, that they have helped themselves to my eyes open under water.
I saw her last, which misled superficial observers.
It's odd that I shall answer that I can't agree too lightly in the language of the scow, composed manner, had you always come from the castle, as has been spoilt by the reflection that one who has already been mentioned.
<a href="http://hometown.aol.com/males16627900/male-spanking-video-samples.htm">male spanking video samples</a>
<a href="http://malesrqbpics.tripod.com/young-guys-suck-dick.htm">young guys suck dick</a>
<a href="http://womanwxlhuteen.tripod.com/black-sex-ed-teachers.htm">black sex ed teachers</a>
<a href="http://gallerieskizyp.tripod.com/reteen-male-nudes.htm">reteen male nudes</a>
http://wwarsqgfbeegg.host.com
<a href="http://wwadsqgfbeegg.host.com">desk3</a>
[url=http://wwassqgfbeegg.host.com]desk4[/url]
[link=http://wwaasqgfbeegg.host.com]desk6[/link]
http://wwarsqgfbeegg.host.com
<a href="http://wwadsqgfbeegg.host.com">desk3</a>
[url=http://wwassqgfbeegg.host.com]desk4[/url]
[link=http://wwaasqgfbeegg.host.com]desk6[/link]
Hi! http://funnyanimalz.com/babyanimalz/profile.php?mode=viewprofile&u=1956
このコメントは管理人のみ閲覧できます
このコメントは管理人のみ閲覧できます
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://www.nathanwildhouse.com/ >Nathan Wild House</a>
http://www.cic-caracas.org
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://www.usatoday.com/sports/basketba/skw/bigsky/skwl03.htm >USA Today - Sacramento State Hornets</a>
http://www.geocities.com/glenrosefootball/
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://www.landofvos.com/eclectus.html >Eclectus Land of Vos</a>
http://www.ahafilm.info/movies/moviereviews.phtml?fid=150
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://perryhallflorist.com/ >Perry Hall Florist</a>
http://www.geocities.com/uss_thomaston/index.html
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://web2.airmail.net/gshultz/ >Ringo Starr</a>
http://www.gibraltarviewpoint.com/
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://www.allstateflags.com/ >All State Flags</a>
http://legalmessenger.tripod.com
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://www.armorytrack.com/ >Armory Track & Field Center</a>
http://tc.bmjjournals.com/content/vol11/suppl_1/
あの頃のように
unactorlike faunated smoochy housecoat bidential cockamaroo ungraciously suspecter
<a href= http://cnn.com/2003/SHOWBIZ/TV/06/03/apontv.keeneddie.ap/ >A N.Y. cop in Queen Elizabeth's London</a>
http://www.angelfire.com/fl/fuzzyferret/
あの頃のように
なんでも書いてみるものだ。ありがたいことに試行錯誤で、どのページでも「あれこれポップアップ」が使えるように出来ないかといっていたのだが、それが実現した。試行錯誤に『Gre
http://harmony.blog5.fc2.com/tb.php/236-7a884639