MCPcopy Index your code
hub / github.com/hoothin/UserScripts / initTxtDownDiv

Function initTxtDownDiv

DownloadAllContent/DownloadAllContent.user.js:885–961  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

883 }
884
885 function initTxtDownDiv() {
886 if (txtDownContent) {
887 txtDownContent.style.display = "";
888 document.body.appendChild(downTxtShadowContainer);
889 return;
890 }
891 txtDownContent = document.createElement("div");
892 txtDownContent.id = "txtDownContent";
893 downTxtShadowContainer = document.createElement("div");
894 document.body.appendChild(downTxtShadowContainer);
895 let shadow = downTxtShadowContainer.attachShadow({ mode: "open" });
896 shadow.appendChild(txtDownContent);
897 txtDownContent.innerHTML = createHTML(`
898 <style>
899 #txtDownContent>div{
900 font-size:16px;
901 color:#333333;
902 width:342px;
903 height:110px;
904 position:fixed;
905 left:50%;
906 top:50%;
907 margin-top:-25px;
908 margin-left:-171px;
909 z-index:2147483647;
910 background-color:#ffffff;
911 border:1px solid #afb3b6;
912 border-radius:10px;
913 opacity:0.95;
914 filter:alpha(opacity=95);
915 box-shadow:5px 5px 20px 0px #000;
916 }
917 #txtDownWords{
918 position:absolute;
919 width:275px;
920 height: 90px;
921 max-height: 90%;
922 border: 1px solid #f3f1f1;
923 padding: 8px;
924 border-radius: 10px;
925 overflow: auto;
926 }
927 #txtDownQuit{
928 width: 30px;height: 30px;border-radius: 30px;position:absolute;right:2px;top:2px;cursor: pointer;background-color:#ff5a5a;
929 }
930 #txtDownQuit>span{
931 height: 30px;line-height: 30px;display:block;color:#FFF;text-align:center;font-size: 12px;font-weight: bold;font-family: arial;background: initial; float: initial;
932 }
933 #txtDownQuit+div{
934 position:absolute;right:0px;bottom:2px;cursor: pointer;display: flex;
935 }
936 #txtDownQuit+div>button{
937 background: #008aff;border: 0;padding: 5px;border-radius: 6px;color: white;float: right;margin: 1px;height: 25px;line-height: 16px;cursor: pointer;overflow: hidden;
938 }
939 </style>
940 <div>
941 <div id="txtDownWords">
942 Analysing......

Callers 2

indexDownloadFunction · 0.85
fetchFunction · 0.85

Calls 3

getI18nFunction · 0.85
initTempSaveFunction · 0.85
createHTMLFunction · 0.70

Tested by

no test coverage detected