forked from MapComplete/MapComplete
Fix: add check for missing 'noopener' attributes; add missing noopener attributes
This commit is contained in:
parent
39572f4767
commit
6e8617c93f
11 changed files with 470 additions and 468 deletions
|
@ -4,9 +4,6 @@ import { Utils } from "../Utils"
|
|||
export type PriviligedLayerType = (typeof Constants.priviliged_layers)[number]
|
||||
|
||||
export default class Constants {
|
||||
static {
|
||||
console.log("Meta (package:json)", meta)
|
||||
}
|
||||
public static vNumber = meta.version
|
||||
|
||||
public static ImgurApiKey = meta.config.api_keys.imgur
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -233,6 +233,7 @@ export class Translation extends BaseUIElement {
|
|||
*
|
||||
* new Translation({"en": "This is a sentence. This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence <br/> This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence <br> This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence with a <b>bold</b> word. This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence with a <b>bold</b> word"
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -243,7 +244,7 @@ export class Translation extends BaseUIElement {
|
|||
continue
|
||||
}
|
||||
let txt = this.translations[lng]
|
||||
txt = txt.replace(/(\.|<br\/>).*/, "")
|
||||
txt = txt.replace(/(\.|<br\/>|<br>).*/, "")
|
||||
txt = Utils.EllipsesAfter(txt, 255)
|
||||
tr[lng] = txt.trim()
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import colors from "./assets/colors.json"
|
||||
import { HTMLElement } from "node-html-parser"
|
||||
|
||||
export class Utils {
|
||||
/**
|
||||
|
@ -490,7 +489,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
"\nThe value is",
|
||||
v
|
||||
)
|
||||
v = (<HTMLElement>v.InnerConstructElement())?.textContent
|
||||
v = v.InnerConstructElement()?.textContent
|
||||
}
|
||||
|
||||
if (typeof v !== "string") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue