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

bahai-indexes

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bahai-indexes - npm Package Compare versions

Comparing version 0.8.4 to 0.9.0

4

CHANGES.md
# CHANGES to `bahai-indexes`
## 0.9.0
- feat: add collapse state buttons and parameter to activate
## 0.8.4

@@ -4,0 +8,0 @@

@@ -76,2 +76,8 @@ import {$, httpquery} from './utils.js';

const adjustCollapseState = (id) => {
const newURL = new URL(location.href);
newURL.searchParams.set('collapse', id);
return newURL.toString();
};
const changeSubmitter = ({target}) => {

@@ -82,2 +88,5 @@ const {type, id} = target;

switch (type) {
case 'submit': // Button
newURL = adjustCollapseState(id);
break;
case 'text':

@@ -101,2 +110,10 @@ newURL = storeInput(id);

const collapseSearchEntries = $('#collapseSearchEntries');
const collapseSearchEntriesPages = $('#collapseSearchEntriesPages');
const expandAll = $('#expandAll');
expandAll.addEventListener('click', changeSubmitter);
collapseSearchEntries.addEventListener('click', changeSubmitter);
collapseSearchEntriesPages.addEventListener('click', changeSubmitter);
const indexTermInput = $('#indexTerm');

@@ -107,2 +124,31 @@ const indexPageInput = $('#indexPage');

const setCollapseState = () => {
const param = url.searchParams.get('collapse');
switch (param) {
case 'collapseSearchEntriesPages':
searchEntriesForm.hidden = false;
searchEntriesPagesForm.hidden = true;
collapseSearchEntries.style.display = 'block';
collapseSearchEntriesPages.style.display = 'none';
expandAll.hidden = false;
break;
case 'collapseSearchEntries':
searchEntriesForm.hidden = true;
searchEntriesPagesForm.hidden = false;
collapseSearchEntries.style.display = 'none';
collapseSearchEntriesPages.style.display = 'block';
expandAll.hidden = false;
break;
// case 'expandAll':
default:
searchEntriesForm.hidden = false;
searchEntriesPagesForm.hidden = false;
collapseSearchEntries.style.display = 'block';
collapseSearchEntriesPages.style.display = 'block';
expandAll.hidden = true;
break;
}
};
const setSelect = (id) => {

@@ -139,2 +185,3 @@ const param = url.searchParams.get(id);

setCollapseState();
selectMenus.forEach((id) => setSelect(id));

@@ -141,0 +188,0 @@ selectMenusPages.forEach((id) => setSelect(id));

2

package.json
{
"name": "bahai-indexes",
"type": "module",
"version": "0.8.4",
"version": "0.9.0",
"description": "Indexes to the Bahá'í Writings in JSON form",

@@ -6,0 +6,0 @@ "main": "src/buildFlattenedJSONAndJS.js",

Sorry, the diff of this file is not supported yet

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