2023年9月18日 星期一

Almighty converter & Useful functions

# TextArea


My ID is p1

My ID is p2

*=already preloaded on this page

# 小工具 Utilities
  • *Object keys listing: objls( object_to_list_properties )
  • *Copy to clipboard: cbcopy( "text_to_copy" )
  • Download current page html
    Type `javascript:` at url and paste
  • Eruda Console: Paste as URL
    Type `javascript:` at url and paste
  • *jQuery
  • *Advanced alert and showlist:

# 數學 Mathematics
  • 排列Permutations: patt( array_of_items )
  • 組合Combinations: comb( array_of_items , number_of_selection )

1 則留言:

匿名 提到...

//雲端藥歷
let v,c;

v=t1.value

v=v.split("關注檢驗")[1]
.split("關注影像")[0];

c=v.split("項目")[1]
.split("\n")[0]
.split("\t").length;
console.log(c);

let rpc = 0
v=v.replace(/\n\n/g, (m)=>{
if( rpc>=(c-1) )
{ rpc=0;
return "\n";
}
else
{ rpc++;
return "\t";
}
});

t2.value=v