Created
August 21, 2019 11:46
-
-
Save TakamiChie/e7e19e2ddd3d1f3b8b788c3a38bb0be6 to your computer and use it in GitHub Desktop.
SharePointリストをテキスト化する
This file contains 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
// 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