In snapshot 2056.19, JS scripts for extending the VIVALDI functionality stopped working.
-
In snapshot 2056.19, the JS scripts for extending the VIVALDI functionality that I connect via the file stopped working browser.html.
If you replace the background-bundle.js, background-common-bundle.js, bundle.js, devtools.js, inject-all-bundle.js, inject-root-bundle.js, markdowneditor-bundle.js, richtexteditor-bundle.js, vendor-bundle.js files with the same files from the previous snapshot, everything works correctly.
The developers decided to restrict users in the Vivaldi modification? -
The developers decided to restrict users in the Vivaldi modification?
No, they’ve just re-made the part of UI your mods altered. When you replace all the files you’ve written, it’s like if you downgraded the UI.
If you wanna get the mods fixed, you’ll have to post them here.
-
@potmeklecbohdan said in In snapshot 2056.19, JS scripts for extending the VIVALDI functionality stopped working.:
No, they’ve just re-made the part of UI your mods altered.
No, I have all JS scripts stopped loading.
For example this:/* * Speed Dial icons * Written by Tam710562 * https://forum.vivaldi.net/topic/35338/speed-dial-icons */ window.gnoh = Object.assign(window.gnoh || {}, { createElement: function (tagName, attribute, parent, inner, options) { if (typeof tagName === 'undefined') { return; } if (typeof options === 'undefined') { options = {}; } if (typeof options.isPrepend === 'undefined') { options.isPrepend = false; } const el = document.createElement(tagName); if (!!attribute && typeof attribute === 'object') { for (let key in attribute) { if (key === 'text') { el.textContent = attribute[key]; } else if (key === 'html') { el.innerHTML = attribute[key]; } else if (key === 'style' && typeof attribute[key] === 'object') { for (let css in attribute.style) { el.style[css] = attribute.style[css]; } } else if (key === 'events' && typeof attribute[key] === 'object') { for (let event in attribute.events) { if (typeof attribute.events[event] === 'function') { el.addEventListener(event, attribute.events[event]); } } } else if (typeof el[key] !== 'undefined') { el[key] = attribute[key]; } else { if (typeof attribute[key] === 'object') { attribute[key] = JSON.stringify(attribute[key]); } el.setAttribute(key, attribute[key]); } } } if (!!inner) { if (!Array.isArray(inner)) { inner = [inner]; } for (let i = 0; i < inner.length; i++) { if (inner[i].nodeName) { el.append(inner[i]); } else { el.append(this.createElementFromHTML(inner[i])); } } } if (typeof parent === 'string') { parent = document.querySelector(parent); } if (!!parent) { if (options.isPrepend) { parent.prepend(el); } else { parent.append(el); } } return el; }, getReactEventHandlersKey: function (element) { if (!this.reactEventHandlersKey) { if (!element) { element = document.getElementById('browser'); } else if (typeof element === 'string') { element = document.querySelector(element); } if (!element || element.ownerDocument !== document) { return; } this.reactEventHandlersKey = Object.keys(element).find(function (key) { return key.startsWith('__reactEventHandlers'); }); } return this.reactEventHandlersKey; }, observeDOM: function (obj, callback, config) { const obs = new MutationObserver(function (mutations, observer) { if (config) { callback(mutations, observer); } else { if (mutations[0].addedNodes.length || mutations[0].removedNodes.length) { callback(mutations, observer); } } }); obs.observe(obj, config || { childList: true, subtree: true }); } }); (function () { function addIcon(dial, url) { var buttonTitle = dial.querySelector('.button-title'); if (buttonTitle) { var imgIcon = gnoh.createElement('img', { width: 16, height: 16, style: { marginRight: '4px', marginLeft: '-7px', verticalAlign: 'top' }, src: 'chrome://favicon/' + url }); buttonTitle.insertBefore(imgIcon, buttonTitle.firstChild); } } function speedDialIcons() { var dials = document.querySelectorAll('.dial:not(.folder):not([data-icon-loaded="true"])'); if (dials.length > 0) { for (var dial of dials) { dial.dataset.iconLoaded = true; var fnKey = gnoh.getReactEventHandlersKey(dial); if (fnKey) { var url = dial[fnKey].children[3].props.bookmark.url; addIcon(dial, url); } } } } gnoh.observeDOM(document, function () { speedDialIcons(); }); })();
-
@potmeklecbohdan
You’re right. I figured it out. It worked after the fixes. I just panicked for nothing.
-
@Gwen-Dragon said in In snapshot 2056.19, JS scripts for extending the VIVALDI functionality stopped working.:
And what can users do to fix it? You patched a JS script?
Yes. I have most JS scripts related to the navigation button panel and the basket panel.
Replaced the identifiers of these panels with new ones:.toolbar.toolbar-droptarget.toolbar-mainbar.toolbar-large
and
.toolbar.toolbar-tabbar.sync-and-trash-container . -