diff --git a/templates/repo/competences/list.tmpl b/templates/repo/competences/list.tmpl index 4fd7110c38..88f7100933 100644 --- a/templates/repo/competences/list.tmpl +++ b/templates/repo/competences/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}

{{.i18n.Tr "repo.competences"}}

-
+
{{$.RenderedCompetences | Str2html}}
{{$.TransformedTrustProps}}
diff --git a/web_src/js/index.js b/web_src/js/index.js index 8ea30f1fca..8330ac87c1 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -19,7 +19,7 @@ import {initMarkupAnchors} from './markup/anchors.js'; import {initNotificationCount, initNotificationsTable} from './features/notification.js'; import {initRepoIssueContentHistory} from './features/repo-issue-content.js'; import {initStopwatch} from './features/stopwatch.js'; -import {initCommentContent, initMarkupContent} from './markup/content.js'; +import {initCommentContent, initMarkupContent, initTrustPropsContent} from './markup/content.js'; import {initUserAuthLinkAccountView, initUserAuthOauth2} from './features/user-auth.js'; import { @@ -105,6 +105,7 @@ $(document).ready(() => { initFootLanguageMenu(); initCommentContent(); + initTrustPropsContent() initContextPopups(); initHeatmap(); initImageDiff(); diff --git a/web_src/js/markup/content.js b/web_src/js/markup/content.js index ef5067fd66..16875903a3 100644 --- a/web_src/js/markup/content.js +++ b/web_src/js/markup/content.js @@ -1,6 +1,7 @@ import {renderMermaid} from './mermaid.js'; import {renderCodeCopy} from './codecopy.js'; import {initMarkupTasklist} from './tasklist.js'; +import {initMarkupTrustProps} from './trust_props.js' // code that runs for all markup content export function initMarkupContent() { @@ -12,3 +13,7 @@ export function initMarkupContent() { export function initCommentContent() { initMarkupTasklist(); } + +export function initTrustPropsContent() { + initMarkupTrustProps(); +} diff --git a/web_src/js/markup/trust_props.js b/web_src/js/markup/trust_props.js new file mode 100644 index 0000000000..f4ceb04470 --- /dev/null +++ b/web_src/js/markup/trust_props.js @@ -0,0 +1,5 @@ +export function initMarkupTrustProps() { + $('.trust-props input[type="checkbox"]').click((e) => { + $(e.target).parent().find('a').remove() + }) +}