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' && define.amd) { |
− | + | define(factory); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} else if (typeof exports === 'object') { | } else if (typeof exports === 'object') { | ||
module.exports = factory; | module.exports = factory; | ||
Line 745: | Line 739: | ||
*/ | */ | ||
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 750: | Line 745: | ||
return true; | return true; | ||
} | } | ||
− | + | return e.parentNode && hasParentClass( e.parentNode, classname ); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
Revision as of 03:13, 4 October 2016