Selectors API - Axorax/kamipass GitHub Wiki

Usage name: s

The selectors API provides some selectors for HTML elements. All of the selectors are give below:

s.modal.create
s.modal.login
s.modal.createInput
s.modal.loginInput
s.modal.createDiv
s.modal.loginDiv
s.search.main
s.search.back
s.search.next
s.search.results
s.search.input
s.qr.box
s.tab.passwords
s.tab.slider
s.subtab.shortcuts
s.notes
s.tabGroup
modal: {
	create: '.modal.create',
	login: '.modal.login',
	createInput: '.modal.create input',
	loginInput: '.modal.login input',
	createDiv: '.modal.create > div',
	loginDiv: '.modal.login > div'
}

search: {
	main: '.search',
	back: '.search .back',
	next: '.search .next',
	results: '.search p',
	input: '.search > input'
}

qr: {
	box: '#qr-box'
}

tab: {
	passwords: '.tab.passwords',
	slider: '.tab-group .slider'
}

subtab: {
	shortcuts: '.subtab.shortcuts'
}

notes: '.notes-editor',
tabGroup: '.tab-group'

Here's an example of a plugin with them:

example.js

console.log(s.tab.slider);

k.onSave['example'] = () => {
	console.log(s.notes.innerText);
};