Skip to content

Instantly share code, notes, and snippets.

@TakamiChie
Created August 21, 2019 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TakamiChie/e7e19e2ddd3d1f3b8b788c3a38bb0be6 to your computer and use it in GitHub Desktop.
Save TakamiChie/e7e19e2ddd3d1f3b8b788c3a38bb0be6 to your computer and use it in GitHub Desktop.
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