Skip to content

Commit 056ba3d

Browse files
authored
Merge pull request #28 from ailoooong/master
fix: mindspore用户授权协议链接修改
2 parents e403978 + 4e04c0b commit 056ba3d

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

pkg/app/pagewriter/login/mindspore.html

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,22 @@
157157
<input class="checkbox" type="checkbox" />
158158
<div class="info">
159159
<p>
160-
我已阅读并同意<a href="/agreement_ch.html" target="_blank"
161-
>《用户授权协议》</a
162-
>和社区<a href="https://www.mindspore.cn/privacy" target="_blank"
163-
>《隐私政策》</a
160+
我已阅读并同意<a
161+
href="/agreement_ch.html"
162+
class="gitee-link"
163+
target="_blank"
164+
>《用户授权协议》</a
165+
><a
166+
href="/agreement_github.html"
167+
class="github-link"
168+
target="_blank"
169+
>《用户授权协议》</a
170+
>和社区<a
171+
href="https://www.mindspore.cn/privacy"
172+
target="_blank"
173+
>《隐私政策》</a
164174
>
165-
</p>
175+
</p>
166176
</div>
167177
</div>
168178
</div>
@@ -178,6 +188,7 @@
178188
btn.addEventListener("click", function () {
179189
checkbox.checked ? "" : event.preventDefault();
180190
});
191+
181192
if (window.location.hash) {
182193
(function () {
183194
var inputs = document.getElementsByName("rd");
@@ -192,6 +203,15 @@
192203
}
193204
})();
194205
}
206+
207+
// 判断是否是github
208+
const { href } = window.location
209+
if (href.includes('summary-github')) {
210+
document.querySelector('.gitee-link').remove()
211+
} else {
212+
document.querySelector('.github-link').remove()
213+
}
214+
195215
</script>
196216
</body>
197217
</html>

0 commit comments

Comments
 (0)