mirror of
https://github.com/Dreamer-Paul/Pio.git
synced 2025-04-22 19:22:36 +08:00
Feat: Custom Content Title Support (#26)
* 调整 Custom 类型为 read 及 link 的文字获取方式,有 title 属性则取 title 属性值,无则取默认的 innerText Co-authored-by: Wenbin.Wang <WenBin.Wang@gshopper.com>
This commit is contained in:
parent
37a1d9a8be
commit
8511d884d7
@ -197,12 +197,14 @@ var Paul_Pio = function (prop) {
|
||||
for(var j = 0; j < e.length; j++){
|
||||
if(t.type === "read"){
|
||||
e[j].onmouseover = function () {
|
||||
modules.render("想阅读 %t 吗?".replace(/%t/, "“" + this.innerText + "”"));
|
||||
var text = this.getAttribute("title") || this.innerText;
|
||||
modules.render("想阅读 %t 吗?".replace(/%t/, "“" + text + "”"));
|
||||
}
|
||||
}
|
||||
else if(t.type === "link"){
|
||||
e[j].onmouseover = function () {
|
||||
modules.render("想了解一下 %t 吗?".replace(/%t/, "“" + this.innerText + "”"));
|
||||
var text = this.getAttribute("title") || this.innerText;
|
||||
modules.render("想了解一下 %t 吗?".replace(/%t/, "“" + text + "”"));
|
||||
}
|
||||
}
|
||||
else if(t.text){
|
||||
|
Loading…
Reference in New Issue
Block a user