ããã¯ãã¹ãŠå¯ã2æã®å€ã«å§ãŸããŸããã ã¯ã©ã€ã¢ã³ãã¯ããµã€ããå éããéã«å¥åŠãªåé¡ã«ã€ããŠæžããŸãããã¹ã©ã€ãã·ã§ãŒããµã€ãã®åäœãå¢ãããŠãããã¯ããããŒãžã«ã¢ã¯ã»ã¹ã§ããŸããã§ããã ãã¹ãŠã®è©³çŽ°ã確èªããŠãã2æ¥åŸãMootoolsãšjQueryãäžç·ã«äœ¿çšããããšãèš±å¯ãããªãçç±ãèŠã€ããŸããã ãããŠããã¢ã«ã³ãŒã«ã¯æªããšãè©äŸ¡ã¯æªããšããèãã§ç¢ºèªãããŸããã
ãããããŸãæåã«ã
ãã©ãã«ã®æ ¹æ¬ãèŠã€ãã
çŸæç¹ã§ã¯ããã©ãŠã¶ã«ã¯ååãªæ°ã®ãããã¡ã€ãªã³ã°ããŒã«ãããïŒãã®çªå·ã¯å€å°åé·ã§ãïŒãåé¡ã®ããå Žæãä¿®æ£ãããšã©ãŒãåçŸããä¿®æ£ããããšãã§ããŸãã ããã¯ããŸã第äžã«ïŒ
- éçºè ã®ããŒã«ã®ãããã¯ãŒã¯ããã«ïŒãã©ãŠã¶ãŒã«ãã£ãŠåæ³çã«éä¿¡ããããã¹ãŠã®ãªã¯ãšã¹ããããã¹ãŠã®ããããŒãšåçãšãšãã«è¡šç€ºããŸãã äœããã®çš®é¡ã®ãã©ãã£ãã¯æå·åã«ã€ããŠè©±ããŠãããããªã¯ãšã¹ãã«é¢ããæšæºæ å ±ïŒããããŒãã¹ããŒã¿ã¹ããµã€ãºïŒãå¿ èŠãªå Žåã¯ãããã§ååã§ãã
- éçºè ããŒã«ã®ã³ã³ãœãŒã«ïŒãã°ïŒã åé¡ãçºçããå Žåããšã©ãŒã®åå ãšã³ãŒã«ããã¯ã¹ã¿ãã¯ã®äž¡æ¹ã確èªã§ããŸãã ãŸããã³ãŒããå®è¡ãããšãã«ãã©ãŠã¶ãŒã®åäœãç¹°ãè¿ããŸãã
- DOMããªãŒãšãµã€ããœãŒã¹ã³ãŒãã ã©ã®ããããã£ãèšå®ãããã©ã®ããããã£ãHTMLèŠçŽ ã«åçã«é©çšããããã¯å¿ ãããæ確ã§ã¯ãããŸããã ãã ãããã©ãŠã¶ããçŽæ¥çŽæ¥æ å ±ãèŠãããšãã§ããŸãã
åçŽãªãšã©ãŒãã¬ãŒã¹ã«ã€ããŠè©±ããŠããå Žåããã®èšäºã¯çµäºããŠããå¯èœæ§ããããŸãã ãããããšã©ãŒã¯åçŽã§ã¯ãªããååž°çã§ããã ãŸããããŒãžãèªã¿èŸŒãŸããæ°ç§åŸã«ãã©ãŠã¶ã¿ãããåããããšã©ãŒã³ã³ãœãŒã«ã«æ¬¡ã®ãã¬ãŒã¹ãæ®ããŸãã
åŒã³åºãå±¥æŽ
c.Request.Class.send @ mootools-core.jsïŒ182 i.extendã$ owner @ mootools-core.jsïŒ50 Element.implement.load @ mootools-core.jsïŒ187 st.event.trigger @ jquery.jsïŒ2989 ïŒå¿åé¢æ°ïŒ@ jquery.jsïŒ3639 st.extend.each @ jquery.jsïŒ642 st.fn.st.each @ jquery.jsïŒ263 st.fn.extend.trigger @ jquery.jsïŒ3638 st.fn.ïŒå¿åé¢æ°ïŒ@ jquery.jsïŒ3662 st.fn.load @ jquery.jsïŒ7498 ïŒå¿åé¢æ°ïŒ@ jquery.bxslider.jsïŒ11 st.extend.each @ jquery.jsïŒ642 st.fn.st.each @ jquery.jsïŒ263 ïŒå¿åé¢æ°ïŒ@ jquery.bxslider.jsïŒ11 st.extend.each @ jquery.jsïŒ642 st.fn.st.each @ jquery.jsïŒ263 loadElements @ jquery.bxslider.jsïŒ11 setup @ jquery.bxslider.jsïŒ11 init @ jquery.bxslider.jsïŒ6 $ .fn.bxSlider @ jquery.bxslider.jsïŒ52 ïŒå¿åé¢æ°ïŒ@ VM375ïŒ2 f @ jquery.jsïŒ1026 p.fireWith @ jquery.jsïŒ1138 st.extend.ready @ jquery.jsïŒ427 xt @ jquery.jsïŒ97
ãµã€ãã§ã¯ãããã¯ç¹°ãè¿ãã®ã¹ã©ã€ããŒã§è¡šç€ºãããŸããïŒå·Šå³ã®è€æ°ã®ç¢å°ã¯ããšã©ãŒã®ããã«ã¹ã©ã€ããŒã®ããã€ãã®ã³ããŒãäºãã«éãªãåã£ãŠããŸãïŒïŒ
åæ çãªäœè«
MooToolsãšjQueryã®äž¡æ¹ãå§çž®ããã圢ã§ãµã€ãã«æ¥ããšèšã䟡å€ããããŸãã ãã ããjQueryã«ã¯ãœãŒã¹ãããã䜿çšãããããã極端ãªãã®ïŒ=æ眪ïŒã®æ€çŽ¢ãéåžžã«å®¹æã«ãªããŸããã
ãœãŒã¹ãããã¯ãå§çž®ã³ãŒãã®ãããã°ã«éåžžã«åœ¹ç«ã¡ãŸã; 3çªç®ã®ä»æ§ã¯æ¢ã«ãªãªãŒã¹ãããŠããããããã®ãµã€ãºãæ°åå°ãããªããŸããã ãœãŒã¹ãããã«ã€ããŠåããŠèããå Žåã¯ã泚æããããšããå§ãããŸãã ããããå ã«é²ã¿ãŸãã
ããæ·±ãæã
ã©ããªåé¡ã§ããåé¡ã«ã€ãªããïŒãã ãè¿œå ããŒã¿ãªãã§ïŒæå°æ¡ä»¶ãç¹å®ãããããã®æ¡ä»¶ãé çªã«åæããããšãéèŠã§ãã çµå±ã®ãšãããåé¡ãå®å®ããŠåçŸããããã®æå°æ¡ä»¶ã¯ãHTMLããŒãžã«ã€ã³ã©ã€ã³JavaScriptã³ãŒããååšããããšã§ããã ãã©ãŠã¶ãŒããã³ã€ã³ã¿ãŒããããããã€ããŒã®ãã£ãã·ã¥ã¡ã«ããºã ã«ãããåçŽãªçµè«ãå°ãåºããªãå ŽåããããŸãããã®ãããå ¬éãããæå·åãããŠããªãHTMLããŒãžã䜿çšããå Žåãæ¡ä»¶ãæ°åæ確ã«è¿°ã¹ãŠå確èªããå¿ èŠããããŸãã
ããããHTMLã«JavaScriptã³ãŒããå«ãããšããã©ãŠã¶ãŒã§ååž°çã«å®è¡ãããããã«ãªã£ãã®ã¯ãªãã§ããïŒ YandexãšGoogleã¯ãã®ãããªç¶æ³ã«ã€ããŠäœãç¥ããŸããã ç§ã¯åœŒãå©ããå¿ èŠããããŸãã
仮説ïŒå°ãªã
äžæ¹ã§ããã¹ãŠãæ確ã§ããJavaScriptã€ã³ã©ã€ã³ã³ãŒãã¯ååž°çã«å®è¡ãããããããã®ãµã€ãã§ã¯äœ¿çšã§ããŸããã äžæ¹ãã€ã³ã©ã€ã³ã³ãŒãã®ååž°çãªå®è¡ã«æ£ç¢ºã«ã€ãªãããã®ã¯äœã§ããïŒ
åŒã³åºãã¹ã¿ãã¯ã¯ããããææ¡ããã®ã«åœ¹ç«ã¡ãŸãïŒäžèšã®ãªã¹ãïŒã BxsliderïŒ
Written while drinking Belgian ales and listening to jazz
-ãã«ã®ãŒã®ãšãŒã«ã¯ééããªãèè ãããã€ãã®éæšæºçãªã·ããªãªãäºæž¬ããããšã劚ããïŒ
JQueryã€ãã³ãåŠç
jQuery.event.triggered = type; { elem [ã¿ã€ã]ïŒïŒ; } catchïŒeïŒ{ // IE <9ã¯ãã©ãŒã«ã¹ã§æ»ã¬/é ãèŠçŽ ã«ãŒããïŒïŒ1486ãïŒ12518ïŒ // winXP IE8ãã€ãã£ãã§ã®ã¿åçŸå¯èœãIE8ã¢ãŒãã®IE9ã§ã¯åçŸäžå¯ }
ãã¹ãŠãæãããªããã§ããjQueryã¯ãã©ãããŒã®æ®ãã®éšåãçµäºãããšããã«ãèŠçŽ ã®ãã€ãã£ãã¡ãœãããåŒã³åºããŸãã ãã®å Žåãããã¯
img["load"]()
ã§ãã ç»åã®èªã¿èŸŒã¿ã€ãã³ãã®å®äºã«ã€ãªãããã®ã¯ããã©ãŠã¶ã®ãã£ãã·ã¥ã«äŸåããå¿ èŠãããã誰ããæºè¶³ããå¿ èŠããããŸãã ããããMooToolsã©ã€ãã©ãªã¯ãã®ç¶æ³ã«åæããŸããã
ããŒãMooToolsã®åŠç
Element.Properties.load = { èšå®ïŒé¢æ°ïŒaïŒ{ var b = this.getïŒ "load"ïŒãcancelïŒïŒ; b.setOptionsïŒaïŒ; ãããè¿ã; }ã getïŒfunctionïŒïŒ{ var a = this.retrieveïŒ "load"ïŒ; ifïŒïŒaïŒ{ a = new Request.HTMLïŒ{dataïŒthisãlinkïŒ "cancel"ãupdateïŒthisãmethodïŒ "get"}ïŒ; this.storeïŒ "load"ãaïŒ; } è¿ã } };
MooToolsã®
load
ã¡ãœããã¯ç¬èªã®æ¹æ³ã§ç解ããŸãã ãããŠããªããžã§ã¯ãã«é¢ããæ å ±ããªãå Žåããªããžã§ã¯ãã¯
new Request.HTML
ä»ããŠããŒããããŸãã MooToolsã«ç»åã«é¢ããæ å ±ããªãå Žåã¯ãç»åãããäžåºŠã¢ããããŒãããŸãããïŒçµå±ãç»åã¯æ¢ã«ãã©ãŠã¶ãã£ãã·ã¥ã«èªã¿èŸŒãŸããŠããŸããããã¯åã«ããŒã«ã«ãŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã®ã¡ã¢ãªå ã®æäœã§ãïŒã ããããjQueryãç»åã«å¯ŸããŠãã®ã¡ââãœãããåŒã³åºããšãäœããã®çç±ã§ãã©ã¡ãŒã¿ãŒãç¹ã«URLãæž¡ãã®ãå¿ããŸãã ããããjQueryã¯ãMooToolsãåŒãç¶ãåäœããããšãç¥ããªããããå¿ èŠã«å¿ããŠãããã®ãã©ã¡ãŒã¿ãŒãå¿ èŠã«ãªããŸãã ãããŠããã©ã¡ãŒã¿ã®ãªãMooToolsã¯ã空ã®ãURLïŒçŸåšã®ããŒãžïŒãããŒãããŸãã
ãŸããæå¹ãªã¬ã€ã¢ãŠãã®ããã«èŠããŸãïŒããŒãžãèªã¿èŸŒãŸãããšãã¹ã©ã€ããŒã«5ã€ã®ç»åãèªã¿èŸŒãŸãããšïŒãã©ãŠã¶ãŒã§ãããçºçããŸãïŒããã©ãŠã¶ãŒã¯ãµãŒããŒããããã«5åïŒHTMLããã¥ã¡ã³ãã®ã¿ïŒããŠã³ããŒãããŸãã ããŒãžããµãŒããŒãã£ãã·ã¥ã«ããå Žåãããã¯ïŒã»ãšãã©ïŒããã©ãŒãã³ã¹ã«ãŸã£ãã圱é¿ããŸããïŒãŸããéçºè ã®ãããã¯ãŒã¯ããŒã«ããŒã®ãªãœãŒã¹ã§ãåçãšã«ãŠã³ã¿ãŒãæ··åšãããããã®ãäœåãªãåŒã³åºããèŠã€ããããšãå°é£ã§ãïŒã
ãããåé¡ã¯ãããã©ã«ãã§ã¯ãMooToolsãããŒããããHTMLããã¥ã¡ã³ãå
eval
ãã¹ãŠã®ã¹ã¯ãªããã®
eval
å®è¡ããããšã§ãã ãããŠãããã¯ããã«æªãããšã§ãããµã€ãã§ã«ãŠã³ã¿ãŒã®ã³ãŒããæ°åå®è¡ããŠãçãæ®ãããšãã§ããŸãã ãããŠãDOMReadyãã³ãã©ãŒãéå§ãããã¹ã©ã€ããŒãèªã¿èŸŒãŸããç»åãèªã¿èŸŒãŸããHTMLããŒãžãèªã¿èŸŒãŸããDOMReadyãå®è¡ãããã¹ãŠã®ã€ã³ã©ã€ã³ã³ãŒããå®è¡ããããšãã¢ã€ãã¢ãåŸãããŸãã
ãŸãšã
è€æ°ã®JavaScriptãã¬ãŒã ã¯ãŒã¯ãå ±æããªãã§ãã ããã 決ããŠïŒJoomlaã®å ŽåïŒã·ã¹ãã ããMooToolsãã«ãããããã©ã°ã€ã³ãããããŸãïŒã æ¥ã«ãã®èšäºãèªã¿çŽãããå Žåã 説æãããåé¡ã¯ãè¡šé¢äžãã§ãããããã«ç¹å®ãããŸããã ãã ãããã¬ãŒã ã¯ãŒã¯ã®å ±ååäœãããããã¯ãŒã¯ïŒé 延ãšãªã¯ãšã¹ãã®åãæž¡ãã®é åºïŒããã³äœ¿çšãããã©ãŠã¶ã«äŸåããå ŽåããããŸãã ãããŠãåé¡ã®åå ãèŠã€ããŠä¿®æ£ããããšã¯ãŸã£ããèããããŸããã
eval
ã¯ãå®è¡å¯èœã³ãŒããå¶åŸ¡ããå Žåã«ã®ã¿äœ¿çšããŠãã ããã ã³ã³ãããŒã«ããªãå Žåãè©äŸ¡ã¯ãããŸããã
ã¢ã«ã³ãŒã«ã¯æªããšãŒã«ã¯æªã§ãã èœã¡çããã©ã€ãã¹ã¿ã€ã«ãç§ãã¡ã®ãã¹ãŠã§ãã
ãã©ãŠã¶ãŒã®éçºè ããŒã«ã¯ãå¿ èŠãªãã¹ãŠã®æ å ±ãå®éã«æäŸã§ããŸãã ãããã䜿çšã§ããå¿ èŠããããŸãã