Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SharePointリストをテキスト化する
// See the right for details. https://qiita.com/TakamiChie/items/e7c8e7ed5d37949298cd
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @output_file_name default.js
// ==/ClosureCompiler==
// ADD YOUR CODE HERE
(function(){
a = "";
f = document.querySelector(".ms-DetailsRow-cellCheck div:first-child[aria-checked=true]") == null;
document.querySelector(".ms-DetailsList-contentWrapper").querySelectorAll(".ms-List-cell").forEach((e) => {
if(e.querySelector(".ms-DetailsRow-cellCheck div:first-child").getAttribute("aria-checked").toLowerCase() === "true" || f){
e.querySelectorAll(".ms-DetailsRow-cell").forEach((l) => {
a += !l.classList.contains("ms-DetailsRow-cellCheck") && l.textContent != "" ? l.textContent.trim() + "\t" : "";
});
a += "\n";
}
});
window.open("about:blank").document.write(`<pre>${a}</pre>`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.