Skip to content

Commit

Permalink
Apply after Akahuku by listeing custom events recently defined
Browse files Browse the repository at this point in the history
  • Loading branch information
toshiakisp committed Aug 9, 2016
1 parent 9c0832e commit 9590df9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions aima_aimani/chrome/content/aima_aimani_frame.js
Expand Up @@ -7,7 +7,21 @@ Cu.import ("chrome://aima_aimani/content/aima_aimani.jsm");

Aima_Aimani.init ();

// 赤福との処理順序の調整
var applyAfterAkahuku = false;
addEventListener ("AkahukuContentBeforeApplied", function (event) {
if (!applyAfterAkahuku) {
applyAfterAkahuku = true;
addEventListener ("AkahukuContentApplied", function (event) {
Aima_Aimani.onDOMContentLoaded (event);
});
}
});

addEventListener ("DOMContentLoaded", function (event) {
if (applyAfterAkahuku) {
return; // AkahukuContentApplied を待つ
}
Aima_Aimani.onDOMContentLoaded (event);
});

Expand Down

0 comments on commit 9590df9

Please sign in to comment.