reintroduce bitty and add progressive enhancement and tabs
This commit is contained in:
17
data/static/js/bits/progressive-enhancement.js
Normal file
17
data/static/js/bits/progressive-enhancement.js
Normal file
@@ -0,0 +1,17 @@
|
||||
export const b = {
|
||||
init: 'enhance',
|
||||
}
|
||||
|
||||
export function enhance(_, __, el) {
|
||||
console.log(el);
|
||||
if (el.classList.contains('js-only')) {
|
||||
el.classList.remove('js-only');
|
||||
}
|
||||
|
||||
if (el.disabled) {
|
||||
el.disabled = false;
|
||||
if (el.title.search('JavaScript') !== -1) {
|
||||
el.title = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user