mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
block alerts in sandbox by default + add translation
This commit is contained in:
parent
2f15bb5085
commit
7a98dc669e
|
@ -988,8 +988,8 @@ def add_ui(ap, retry):
|
|||
ap2.add_argument("--txt-max", metavar="KiB", type=int, default=64, help="max size of embedded textfiles on ?doc= (anything bigger will be lazy-loaded by JS)")
|
||||
ap2.add_argument("--doctitle", metavar="TXT", type=u, default="copyparty", help="title / service-name to show in html documents")
|
||||
ap2.add_argument("--pb-url", metavar="URL", type=u, default="https://github.com/9001/copyparty", help="powered-by link; disable with -np")
|
||||
ap2.add_argument("--md-sbf", metavar="FLAGS", type=u, default="downloads forms modals popups scripts top-navigation-by-user-activation", help="list of capabilities to ALLOW for README.md docs (volflag=md_sbf); see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox")
|
||||
ap2.add_argument("--lg-sbf", metavar="FLAGS", type=u, default="downloads forms modals popups scripts top-navigation-by-user-activation", help="list of capabilities to ALLOW for prologue/epilogue docs (volflag=lg_sbf)")
|
||||
ap2.add_argument("--md-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to ALLOW for README.md docs (volflag=md_sbf); see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox")
|
||||
ap2.add_argument("--lg-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to ALLOW for prologue/epilogue docs (volflag=lg_sbf)")
|
||||
ap2.add_argument("--no-sb-md", action="store_true", help="don't sandbox README.md documents (volflags: no_sb_md | sb_md)")
|
||||
ap2.add_argument("--no-sb-lg", action="store_true", help="don't sandbox prologue/epilogue docs (volflags: no_sb_lg | sb_lg); enables non-js support")
|
||||
|
||||
|
|
|
@ -346,6 +346,7 @@ var Ls = {
|
|||
"s_a1": "specific metadata properties",
|
||||
|
||||
"md_eshow": "cannot show ",
|
||||
"md_off": "[📜<em>readme</em>] disabled in [⚙️] -- document hidden",
|
||||
|
||||
"xhr403": "403: Access denied\n\ntry pressing F5, maybe you got logged out",
|
||||
"cf_ok": "sorry about that -- DD" + wah + "oS protection kicked in\n\nthings should resume in about 30 sec\n\nif nothing happens, hit F5 to reload the page",
|
||||
|
@ -791,6 +792,7 @@ var Ls = {
|
|||
"s_a1": "konkrete egenskaper",
|
||||
|
||||
"md_eshow": "kan ikke vise ",
|
||||
"md_off": "[📜<em>readme</em>] er avskrudd i [⚙️] -- dokument skjult",
|
||||
|
||||
"xhr403": "403: Tilgang nektet\n\nkanskje du ble logget ut? prøv å trykk F5",
|
||||
"cf_ok": "beklager -- liten tilfeldig kontroll, alt OK\n\nting skal fortsette om ca. 30 sekunder\n\nhvis ikkeno skjer, trykk F5 for å laste siden på nytt",
|
||||
|
@ -6734,7 +6736,7 @@ function set_tabindex() {
|
|||
|
||||
function show_readme(md) {
|
||||
if (!treectl.ireadme)
|
||||
return;
|
||||
return sandbox(ebi('epi'), '', '', 'a');
|
||||
|
||||
show_md(md, 'README.md', ebi('epi'));
|
||||
}
|
||||
|
@ -6744,7 +6746,7 @@ if (readme)
|
|||
|
||||
function sandbox(tgt, rules, cls, html) {
|
||||
if (!treectl.ireadme) {
|
||||
tgt.innerHTML = html ? '[📜<em>readme</em>] disabled in [⚙️] -- document hidden' : '';
|
||||
tgt.innerHTML = html ? L.md_off : '';
|
||||
return;
|
||||
}
|
||||
if (!rules || (html || '').indexOf('<') == -1) {
|
||||
|
|
Loading…
Reference in a new issue