Skip to content

Instantly share code, notes, and snippets.

@NikolaRusakov
Last active September 27, 2021 17:49
Show Gist options
  • Save NikolaRusakov/f86f6e5bcf4ec01b1c0c4de807afee01 to your computer and use it in GitHub Desktop.
Save NikolaRusakov/f86f6e5bcf4ec01b1c0c4de807afee01 to your computer and use it in GitHub Desktop.
copy mobile tabs
tabs = document.querySelectorAll('.subrow-box .url')
str = '';
for (i=0;i<tabs.length;i++){
console.log(tabs[i].innerHTML)
if (tabs[i].innerHTML != null){
str += tabs[i].innerHTML+'\n'
}
}
copy(str)
---
tabs = document.querySelectorAll('.subrow-box .url')
names= document.querySelectorAll('.subrow-box .name')
str = '';
for (i=0;i<tabs.length;i++){
console.log(tabs[i].innerHTML)
if (tabs[i].innerHTML != null && names[i] !=null && names[i].innerHTML != null ){
str += 'name;'+names[i].innerHTML+';'+tabs[i].innerHTML;+'\n \n'
} else if (tabs[i].innerHTML != null &&names[i] !=null && names[i].innerHTML == null ){
str += 'name;;'+tabs[i].innerHTML;+'\n \n'
}
}
copy(str)
@NylaTheWolf
Copy link

So this is for copying open browser tabs on mobile? Would this work for Chrome on the iPad?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment