Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@itcenter-layout/masterpage

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itcenter-layout/masterpage - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

46

dist/js/itcenter-masterdesign-masterpage.js
/*!
Itcenter masterpage v0.5.0
Itcenter masterpage v0.5.1
*/

@@ -11,3 +11,5 @@ document.addEventListener('DOMContentLoaded', (event) => {

var searchButtonOpen = document.getElementById("search-button-open");
var main = document.getElementById("main");
var backupMain = main.innerHTML;
if (cancelSearch) {

@@ -27,6 +29,2 @@ cancelSearch.addEventListener("click", function (e) {

/*$('.search-button').on('click', function () {
rwthapp.search.search($('.search-input').val());
});*/
if (inputField) {

@@ -49,5 +47,25 @@ inputField.addEventListener("keypress", function (e) {

}
searchMain();
inputField.focus();
});
}
function searchMain(text) {
if (window.find && window.getSelection) {
document.designMode = "on";
main.innerHTML = backupMain;
var sel = window.getSelection();
sel.collapse(main, 0);
var text = inputField.value;
while (window.find(text)) {
if(main.contains(sel.getRangeAt(0).startContainer)) {
document.execCommand("HiliteColor", false, "yellow");
sel.collapseToEnd();
}
}
document.designMode = "off";
}
}
if (cancelSearch) {

@@ -58,2 +76,3 @@ cancelSearch.addEventListener("click", function (e) {

cancelSearch.style.display = "none";
main.innerHTML = backupMain;
return false;

@@ -68,2 +87,3 @@ });

inputField.value = "";
main.innerHTML = backupMain;
});

@@ -124,6 +144,6 @@ }

e.preventDefault();
if(!body.classList.contains("show-drawer")) {
body.classList.add("show-drawer");
if(!body.classList.contains("show-menu")) {
body.classList.add("show-menu");
} else {
body.classList.remove("show-drawer");
body.classList.remove("show-menu");
}

@@ -137,4 +157,4 @@ });

e.preventDefault();
if(body.classList.contains("show-drawer")) {
body.classList.remove("show-drawer");
if(body.classList.contains("show-menu")) {
body.classList.remove("show-menu");
}

@@ -159,7 +179,7 @@ });

if(navWidth <= 767) {
body.classList.remove("show-drawer");
body.classList.remove("show-menu");
} else {
body.classList.add("show-drawer");
body.classList.add("show-menu");
}
}
});
{
"name": "@itcenter-layout/masterpage",
"version": "0.5.0",
"version": "0.5.1",
"description": "masterpage",

@@ -5,0 +5,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc