Restore Methods for chrome.tabs
-
@luetage said in Restore Methods for chrome.tabs:
@tam710562 Well, good job, it works. You just saved tabscroll ^^
-
Note that getAllInWindow() and getSelected() are marked as deprecated and has been for a while, there should be no reason to continue using them.
-
@pettern True, but is there a chance we get the non‐deprecated apis back?
-
Why in the bloody nonsense insertCSS was removed?
-
tabs.executeScript
andtabs.insertCSS
are marked as deprecated on chrome developer page. I noticed this when trying to update an extension. The replacement isscripting.executeScript
andscripting.insertCSS
, but I couldn’t get it to work in Vivaldi for modifications. -
@luetage i tested with it and it is working
chrome.tabs.query({ active: true, windowId: vivaldiWindowId }, (tabs) => { const tab = tabs[0]; if (tab) { chrome.scripting.executeScript({ target: { tabId: tab.id }, function: () => { window.scrollTo({ top: 0, behavior: 'smooth' }); } }); } });
-
@tam710562 Thank you, you are right. I left the target out. Thought it would work with active tab like the old api. Anyway, this probably means people don’t need to install extra code anymore.
-
@luetage @tam710562 I'm slightly confused. So the mod still work, the original issue was fixed or the latest js snippet is the updated one?
-
@hadden89 This page doesn’t feature a mod, but a workaround to make deprecated apis work in other mods. This isn’t needed anymore, since the new chrome.scripting api seems to work.
-
@luetage What I thought. So my small experimental extension (colored scrollbars) is probably broken due the fix of the issue plus the recent changes. Seems I have (to try) to learn few chrome APIs now
-
This post is deleted!