@itcenter-layout/masterpage
Advanced tools
Comparing version 0.5.5 to 0.5.6
/*! | ||
Itcenter masterpage v0.5.5 | ||
Itcenter masterpage v0.5.6 | ||
*/ | ||
@@ -11,4 +11,2 @@ var searchLoad = function () { | ||
var searchButtonOpen = document.getElementById("search-button-open"); | ||
var main = document.getElementById("main"); | ||
var backupMain = main.innerHTML; | ||
@@ -47,3 +45,3 @@ if (cancelSearch) { | ||
searchMain(); | ||
// Implement search function here | ||
inputField.focus(); | ||
@@ -53,19 +51,2 @@ }); | ||
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) { | ||
@@ -76,3 +57,2 @@ cancelSearch.addEventListener("click", function (e) { | ||
cancelSearch.style.display = "none"; | ||
main.innerHTML = backupMain; | ||
return false; | ||
@@ -87,3 +67,2 @@ }); | ||
inputField.value = ""; | ||
main.innerHTML = backupMain; | ||
}); | ||
@@ -90,0 +69,0 @@ } |
{ | ||
"name": "@itcenter-layout/masterpage", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "masterpage", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45039
1153