lmmx / devnotes Goto Github PK
View Code? Open in Web Editor NEWobscure technical resolutions re: errors, installation quirks, custom setups etc.
obscure technical resolutions re: errors, installation quirks, custom setups etc.
https://github.com/lmmx/devnotes/wiki/Export-all-Chrome-tabs-on-Android
Can't get the code to work anymore as it seems Google changed the structure. This works:
tabs = document.querySelector('#-blink-dev-tools > div.widget.vbox.root-view > div > div > div > div:nth-child(1) > div > div').shadowRoot.querySelectorAll('div > div.hbox.devices-container > div.flex-auto.vbox > div > div.device-browser-list.vbox > div > div.device-page-list.vbox.device-view-more-toggled > .vbox')
str = '';
for (i=0;i<tabs.length;i++){
if (tabs[i].querySelector('.device-page-url .devtools-link') != null){
str += '- ['+tabs[i].querySelector('.device-page-title').textContent + '](' + tabs[i].querySelector('.device-page-url .devtools-link').getAttribute('href') +')\n'
} else {
console.log(tabs[i])
}
}
copy(str)
Just the top part. Your code is brilliant, thanks lots for it!
I am having trouble running the original script that you referred from (tried catalina) and your modified script (tried mojave). I have tried with all the cpuids in the original script. I dont think that wil help. I am attaching the troubleshooting file herewith.
I lost interest in this one, but I uploaded the note as a start: it'd be nice to parse the available PyTorch wheels into a pandas DataFrame (when I get bored!)
This builds upon your method of importing tabs and allows the tabs to be imported as bookmarks.
Not the cleanest code but works.
This can only be done manually and imported through chrome's import bookmarks in HTML API due to rate limiting.
https://stackoverflow.com/questions/19374378/how-to-import-bookmarks-programmatically
tabs = document.querySelector("#-blink-dev-tools > div.widget.vbox.root-view > div > div > div > div:nth-child(1) > div > div").shadowRoot.querySelector("div > div.hbox.devices-container > div.flex-auto.vbox > div > div.device-browser-list.vbox > div > div.device-page-list.vbox.device-view-more-toggled").querySelectorAll("div.vbox")
str = `<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1536609418" LAST_MODIFIED="1536609442" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>`;
for (i=0;i<tabs.length;i++){
if (tabs[i] != null){
str += ' <DT><A HREF="' + tabs[i].querySelector('div.device-page-url > x-link').attributes.href.value +' "ADD_DATE="1536609434">'+ tabs[i].querySelector('.device-page-title').textContent + '</A>' +'\n'
} else {
console.log(tabs[i])
}
}
str+= `</DL><p>
</DL><p>`;
copy(str)
Some URLS may have the chrome-distiller
prefix. These have to be resolved manually as they are web pages that were in Reader's mode
when imported as tabs. Please feel free to clean up the code, add this to the wiki or spin into a browser extension etc.
Latest Chrome browser version truncates the URLs taken from here:
document.querySelectorAll('.subrow-box .url')
I think we should wait to a Chrome upgrade, because I couldn't find any other source to get those URLs.
What do you think?
Saw your blog plots. Thanks for putting that together. FYI a convenient way to include (sub) documents in another Rmd file is to use the child
option (http://stackoverflow.com/a/17605475/1974918)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.