Skip to content

Commit

Permalink
#11 refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkha committed Apr 15, 2015
1 parent dce1901 commit 68b0ea7
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions src/scripts/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,28 @@ var allFrames = [];
var inputTypes = ["textarea", "text", "search", "tel"];

function AVIMInit(AVIM, isAttach) {
/*if(AVIM.support) {
allFrames = document.getElementsByTagName("iframe");
for(AVIM.g = 0; AVIM.g < allFrames.length; AVIM.g++) {
if(findIgnore(allFrames[AVIM.g])) {
continue;
}
var iframedit;
try {
AVIM.wi = allFrames[AVIM.g].contentWindow;
iframedit = AVIM.wi.document;
iframedit.wi = AVIM.wi;
if(iframedit && (upperCase(iframedit.designMode) == "ON")) {
iframedit.AVIM = AVIM;
if (isAttach) {
attachEvt(iframedit, "keypress", ifMoz, false);
attachEvt(iframedit, "keydown", keyDownHandler, false);
} else {
attachEvt(iframedit, "keypress", ifMoz, false);
attachEvt(iframedit, "keydown", keyDownHandler, false);
}
}
} catch(e) {}
allFrames = document.getElementsByTagName("iframe");
for(AVIM.g = 0; AVIM.g < allFrames.length; AVIM.g++) {
if(findIgnore(allFrames[AVIM.g])) {
continue;
}
}*/
var iframedit;
try {
AVIM.wi = allFrames[AVIM.g].contentWindow;
iframedit = AVIM.wi.document;
iframedit.wi = AVIM.wi;
if(iframedit && (upperCase(iframedit.designMode) == "ON")) {
iframedit.AVIM = AVIM;
if (isAttach) {
attachEvt(iframedit, "keypress", ifMoz, false);
attachEvt(iframedit, "keydown", keyDownHandler, false);
} else {
attachEvt(iframedit, "keypress", ifMoz, false);
attachEvt(iframedit, "keydown", keyDownHandler, false);
}
}
} catch(e) {}
}/**/
}

function findIgnore(el) {
Expand Down

0 comments on commit 68b0ea7

Please sign in to comment.