Last active
September 27, 2021 17:49
-
-
Save NikolaRusakov/f86f6e5bcf4ec01b1c0c4de807afee01 to your computer and use it in GitHub Desktop.
copy mobile tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So this is for copying open browser tabs on mobile? Would this work for Chrome on the iPad?