Chloroplast (Talk | contribs) |
Chloroplast (Talk | contribs) |
||
Line 3: | Line 3: | ||
<script> | <script> | ||
(function (root, factory) { | (function (root, factory) { | ||
− | if (typeof define === 'function') { | + | if (typeof define === 'function' ) { |
− | + | if(define.amd){ | |
+ | define(factory); | ||
+ | }else if (typeof exports === 'object') { | ||
+ | module.exports = factory; | ||
+ | } else { | ||
+ | root.lunar = factory(); | ||
+ | } | ||
} else if (typeof exports === 'object') { | } else if (typeof exports === 'object') { | ||
module.exports = factory; | module.exports = factory; | ||
Line 739: | Line 745: | ||
*/ | */ | ||
var SidebarMenuEffects = (function() { | var SidebarMenuEffects = (function() { | ||
− | |||
function hasParentClass( e, classname ) { | function hasParentClass( e, classname ) { | ||
if(e === document) return false; | if(e === document) return false; | ||
Line 745: | Line 750: | ||
return true; | return true; | ||
} | } | ||
− | + | if(e.parentNode){ | |
+ | if(hasParentClass( e.parentNode, classname )){ | ||
+ | return true; | ||
+ | }else{ | ||
+ | return false; | ||
+ | } | ||
+ | }else{ | ||
+ | return false; | ||
+ | } | ||
} | } | ||
Revision as of 03:57, 4 October 2016