-"use strict";
-// Configure ZeroClipboard
-import Clipboard from "clipboard";
+const Clipboard = require("clipboard");
+const Code = require('../code');
-export default window.setupPageShow = function (pageId) {
+let setupPageShow = window.setupPageShow = function (pageId) {
+
+ Code.highlight();
+
+ if (!pageId) return;
// Set up pointer
let $pointer = $('#pointer').detach();
let $idElem = $(idElem);
let color = $('#custom-styles').attr('data-color-light');
$idElem.css('background-color', color).attr('data-highlighted', 'true').smoothScrollTo();
+ setTimeout(() => {
+ $idElem.addClass('anim').addClass('selectFade').css('background-color', '');
+ setTimeout(() => {
+ $idElem.removeClass('selectFade');
+ }, 3000);
+ }, 100);
} else {
$('.page-content').find(':contains("' + text + '")').smoothScrollTo();
}
}
});
+ // in order to call from other places.
+ window.setupPageShow.goToText = goToText;
};
+
+module.exports = setupPageShow;
\ No newline at end of file