/** * Retrieves the vertical index which was stored using * #setPreviousVerticalIndex() or 0 if no previous index * exists. * * @param {HTMLElement} stack The vertical stack element */ function getPreviousVerticalIndex( stack ) { if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) { // Prefer manually defined start-indexv var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previous-indexv'; return parseInt( stack.getAttribute( attributeName ) || 0, 10 ); } return 0; }
version = linkEls[i].getAttribute('data-version') el = linkEls[i] dlLocal = downloadHead.getAttribute('data-dl-local') switch (os) { case 'Mac':
background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), backgroundImage: slide.getAttribute( 'data-background-image' ), backgroundVideo: slide.getAttribute( 'data-background-video' ), backgroundIframe: slide.getAttribute( 'data-background-iframe' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), backgroundTransition: slide.getAttribute( 'data-background-transition' ) };
/** * initialize state for page permission */ initStateGrant() { const mainContent = document.getElementById('content-main'); if (mainContent == null) { logger.debug('#content-main element is not exists'); return; } this.state.grant = +mainContent.getAttribute('data-page-grant'); const grantGroupId = mainContent.getAttribute('data-page-grant-group'); if (grantGroupId != null && grantGroupId.length > 0) { this.state.grantGroupId = grantGroupId; this.state.grantGroupName = mainContent.getAttribute('data-page-grant-group-name'); } }
constructor() { super(); let globalNotification; try { globalNotification = JSON.parse(document.getElementById('admin-global-notification-setting').getAttribute('data-global-notification')); } catch (err) { toastError(err); logger.error(err); } this.state = { globalNotificationId: globalNotification._id || null, triggerPath: globalNotification.triggerPath || '', notifyToType: globalNotification.__t || 'mail', emailToSend: globalNotification.toEmail || '', slackChannelToSend: globalNotification.slackChannels || '', triggerEvents: new Set(globalNotification.triggerEvents), }; this.submitHandler = this.submitHandler.bind(this); }
const isRTL = document.documentElement.getAttribute('dir') == 'rtl';
userGroup: JSON.parse(rootElem.getAttribute('data-user-group')), userGroupRelations: [], relatedPages: [],
const expiredAt = shareContent.getAttribute('data-share-link-expired-at'); const createdAt = shareContent.getAttribute('data-share-link-created-at');
var _this = this; var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
/* * Global function for getting the index of current popup in queue */ var getQueueStep = function getQueueStep() { return document.body.getAttribute('data-swal2-queue-step'); }
function filter(term) { clear() var referer = ui.getCurrent() ? ui.getCurrent().getAttribute('href') : undefined; render(dirStorage.ds, referer, term, ui.searchInputForm) }
// by james a rosen. // https://github.com/Modernizr/Modernizr/issues/258 Modernizr.addTest('createelement-attrs', function() { try { return document.createElement("<input name='test' />").getAttribute('name') == 'test'; } catch(e) { return false; } });
const getDirection = () => ( (typeof document !== 'undefined' && document.documentElement !== null && document.documentElement.getAttribute('dir')) || DIRECTIONS.LTR ).toLowerCase()
/** * Retrieves the vertical index which was stored using * #setPreviousVerticalIndex() or 0 if no previous index * exists. * * @param {HTMLElement} stack The vertical stack element */ function getPreviousVerticalIndex( stack ) { if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) { // Prefer manually defined start-indexv var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previous-indexv'; return parseInt( stack.getAttribute( attributeName ) || 0, 10 ); } return 0; }
background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), backgroundImage: slide.getAttribute( 'data-background-image' ), backgroundVideo: slide.getAttribute( 'data-background-video' ), backgroundIframe: slide.getAttribute( 'data-background-iframe' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), backgroundTransition: slide.getAttribute( 'data-background-transition' ) };