| 3371 | content.find(".pl-extra").append(`<button class="pl-btn-primary pl-btn-warning abdm listener-open-abdm-setting listener-tip" data-title="${rpc.domain + ":" + rpc.port}" data-back-to-downloads="true"><svg class="pl-icon"><use xlink:href="#pl-icon-fa-gear"/></svg>修改服务参数</button>`); |
| 3372 | } |
| 3373 | function updateTooltip($element, value) { |
| 3374 | if (!value) return; |
| 3375 | $element.addClass("listener-tip"); |
| 3376 | if (value.startsWith("+")) { |
| 3377 | // 追加模式:去掉开头的 "+",然后拼接到现有 data-title |
| 3378 | var newValue = value.substring(1); |
| 3379 | var existingTitle = $element.attr("data-title") || ""; |
| 3380 | $element.attr("data-title", existingTitle + newValue); |
| 3381 | } else { |
| 3382 | // 替换模式 |
| 3383 | $element.attr("data-title", value); |
| 3384 | } |
| 3385 | } |
| 3386 | if (tooltip?.enhance) updateTooltip(content.find(".enhance"), tooltip.enhance); |
| 3387 | if (tooltip?.normal) updateTooltip(content.find(".normal"), tooltip.normal); |
| 3388 | if (tooltip?.copy) updateTooltip(content.find(".copy"), tooltip.copy); |