Lines 358-373
function saveOrClearSimpleSearchParams() {
Link Here
|
358 |
localStorage.setItem('cat_search_pulldown_selection', pulldown_selection ); |
358 |
localStorage.setItem('cat_search_pulldown_selection', pulldown_selection ); |
359 |
localStorage.setItem('searchbox_value', searchbox_value ); |
359 |
localStorage.setItem('searchbox_value', searchbox_value ); |
360 |
} |
360 |
} |
361 |
|
|
|
362 |
// https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f |
363 |
function copyToClipboard( text ){ |
364 |
var el = document.createElement("textarea"); // Create a <textarea> element |
365 |
el.value = text; // Set its value to the string that you want copied |
366 |
el.setAttribute("readonly", ""); // Make it readonly to be tamper-proof |
367 |
el.style.position = "absolute"; |
368 |
el.style.left = "-9999px"; // Move outside the screen to make it invisible |
369 |
document.body.appendChild(el); // Append the <textarea> element to the HTML document |
370 |
el.select(); // Select the <textarea> content |
371 |
document.execCommand("copy"); // Copy - only works as a result of a user action (e.g. click events) |
372 |
document.body.removeChild(el); // Remove the <textarea> element |
373 |
} |
374 |
- |