Explorar o código

:ambulance: 不替换二级域名

visuddhinanda@gmail.com %!s(int64=4) %!d(string=hai) anos
pai
achega
9fe31c4c87
Modificáronse 2 ficheiros con 4 adicións e 3 borrados
  1. 1 1
      public/app/article/article.js
  2. 3 2
      public/app/term/note.js

+ 1 - 1
public/app/article/article.js

@@ -46,7 +46,7 @@ function articel_load(id, collection_id) {
 						$("#article_author").html( article_author );
 
 						//将绝对链接转换为 用户连接的主机链接
-						result.content = result.content.replace(/[A-z]*.wikipali.org/g,location.host);
+						//result.content = result.content.replace(/www-[A-z]*.wikipali.org/g,location.host);
 
 						$("#contents").html(note_init(result.content,"",result.owner,result.lang));
 						//处理<code>标签作为气泡注释

+ 3 - 2
public/app/term/note.js

@@ -311,7 +311,7 @@ function render_read_mode_sent(iterator) {
 		let html = "<span class='tran_sent' lang='" + oneTran.lang + "' channal='" + oneTran.channal + "'>";
 
 		//将绝对链接转换为 用户连接的主机链接
-		oneTran.text = oneTran.text.replace(/[A-z]*.wikipali.org/g,location.host);
+		//oneTran.text = oneTran.text.replace(/www-[A-z]*.wikipali.org/g,location.host);
 
 		html += marked(term_std_str_to_tran(oneTran.text, oneTran.channal, oneTran.editor, oneTran.lang));
 		html += "</span>";
@@ -920,7 +920,8 @@ function render_one_sent_tran_a(iterator, diff = false) {
 	let sid = iterator.book + "-" + iterator.para + "-" + iterator.begin + "-" + iterator.end;
 
 	//将绝对链接转换为 用户连接的主机链接
-	let showText = iterator.text.replace(/[A-z]*.wikipali.org/g,location.host);
+	//let showText = iterator.text.replace(/www-[A-z]*.wikipali.org/g,location.host);
+	let showText = iterator.text;
 
 	if (iterator.text == "") {
 		if (typeof iterator.channalinfo == "undefined") {