ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 11317


Ignore:
Timestamp:
Apr 16, 2009, 10:17:04 AM (11 years ago)
Author:
fukamachi
Message:

#2328 冗長な表現を省略

Location:
OpenPNE/branches/work/fukamachi/pne_decoration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/fukamachi/pne_decoration/pne_decoration.js

    r11292 r11317  
    2020table.style.display='none';Event.stopObserving(document,'mousedown',pne_mce_hide_color_table);}
    2121function pne_insert_str_to_selection(elm,str)
    22 {var selection;elm.focus();if(undefined!==window.execScript){selection=window.opener.document.selection.createRange();selection.expand("character");if(selection.text===""){selection.text=str+selection.text+"\n";}else{selection.text=str+selection.text;}}else{selection=new Selection(elm);var pos=selection.create();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}}
     22{var selection;elm.focus();if(undefined!==window.execScript){selection=window.opener.document.selection.createRange();selection.text=str+selection.text;}else{selection=new Selection(elm);var pos=selection.create();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}}
  • OpenPNE/branches/work/fukamachi/pne_decoration/pne_decoration.js.src

    r11292 r11317  
    184184    if (undefined !== window.execScript) {
    185185        selection = window.opener.document.selection.createRange();
    186         selection.expand("character");
    187         if (selection.text === "") {
    188             selection.text = str + selection.text + "\n";
    189         } else {
    190             selection.text = str + selection.text;
    191         }
     186        selection.text = str + selection.text;
    192187    } else {
    193188        selection = new Selection(elm);
     
    196191        var head = elm.value.substring(0, pos.start);
    197192        var tail = elm.value.substring(pos.end, elm.value.length);
    198         elm.value =  head + str + tail;
     193        elm.value = head + str + tail;
    199194    }
    200195}
Note: See TracChangeset for help on using the changeset viewer.