\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n"]}, media: undefined });
};
const __vue_scope_id__$7 = undefined;
const __vue_module_identifier__$7 = undefined;
const __vue_is_functional_template__$7 = false;
const __vue_component__$7 = normalizeComponent(
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
__vue_inject_styles__$7,
__vue_script__$7,
__vue_scope_id__$7,
__vue_is_functional_template__$7,
__vue_module_identifier__$7,
false,
createInjector);var script$6 = {
data() {
return {
excludeURLSwitchVal: isExcludeURLSwitchGm(),
data: getExcludeURLsGm(),
testInputRegVal: "",
testInputVal: ""
};
},
methods: {
tableAddItemBut() {
this.data.push({ state: false, regularURL: "", desc: "" });
},
tableDelItemBut(index) {
this.data.splice(index, 1);
},
refreshBut() {
this.data = getExcludeURLsGm();
this.$message.success("刷新成功");
},
saveBut() {
for (let v of this.data) {
if (v.regularURL === "") {
this.$message.error("正则地址不能为空");
return;
}
}
GM_setValue("exclude_urls_gm", this.data);
this.$message.success("保存成功");
},
tableVerificationItemUrlBut(url) {
if (window.location.href.search(url) !== -1) {
this.$message.success("匹配成功!");
} else {
this.$message.warning("匹配失败!");
}
},
testVerificationBut() {
const inputVal = this.testInputVal;
const inputRegVal = this.testInputRegVal;
if (inputVal.length === 0 || inputRegVal.length === 0) {
this.$message.warning("请正确填写内容");
return;
}
if (inputVal.search(inputRegVal) !== -1) {
this.$message.success("匹配成功!");
} else {
this.$message.warning("匹配失败!");
}
}
},
watch: {
excludeURLSwitchVal(n) {
GM_setValue("is_exclude_url_switch_gm", n);
}
}
};
const __vue_script__$6 = script$6;
var __vue_render__$6 = function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c(
"div",
[
_c(
"el-card",
{
attrs: { shadow: "never" },
scopedSlots: _vm._u([
{
key: "header",
fn: function () {
return [_vm._v("说明")]
},
proxy: true,
},
]),
},
[
_vm._v(" "),
_c(
"el-row",
[
_c(
"el-col",
{ attrs: { span: 12 } },
[
_c("div", [_vm._v("1.被排除的页面大部分功能会失效")]),
_vm._v(" "),
_c("div", [_vm._v("2.修改后建议刷新页面")]),
_vm._v(" "),
_c("el-switch", {
attrs: { "active-text": "启用设置" },
model: {
value: _vm.excludeURLSwitchVal,
callback: function ($$v) {
_vm.excludeURLSwitchVal = $$v;
},
expression: "excludeURLSwitchVal",
},
}),
],
1
),
_vm._v(" "),
_c(
"el-col",
{ attrs: { span: 12 } },
[
_c("el-input", {
scopedSlots: _vm._u([
{
key: "prepend",
fn: function () {
return [_vm._v("正则地址")]
},
proxy: true,
},
]),
model: {
value: _vm.testInputRegVal,
callback: function ($$v) {
_vm.testInputRegVal =
typeof $$v === "string" ? $$v.trim() : $$v;
},
expression: "testInputRegVal",
},
}),
_vm._v(" "),
_c("el-input", {
scopedSlots: _vm._u([
{
key: "prepend",
fn: function () {
return [_vm._v("测试地址")]
},
proxy: true,
},
]),
model: {
value: _vm.testInputVal,
callback: function ($$v) {
_vm.testInputVal =
typeof $$v === "string" ? $$v.trim() : $$v;
},
expression: "testInputVal",
},
}),
_vm._v(" "),
_c(
"div",
{ staticClass: "el-horizontal-right" },
[
_c(
"el-button",
{ on: { click: _vm.testVerificationBut } },
[_vm._v("测试验证")]
),
],
1
),
],
1
),
],
1
),
],
1
),
_vm._v(" "),
_c(
"el-table",
{ attrs: { data: _vm.data, border: "", stripe: "" } },
[
_c("el-table-column", {
attrs: { label: "启用", width: "100" },
scopedSlots: _vm._u([
{
key: "default",
fn: function (scope) {
return [
_c("el-switch", {
model: {
value: scope.row.state,
callback: function ($$v) {
_vm.$set(scope.row, "state", $$v);
},
expression: "scope.row.state",
},
}),
]
},
},
]),
}),
_vm._v(" "),
_c("el-table-column", {
attrs: { label: "正则地址" },
scopedSlots: _vm._u([
{
key: "default",
fn: function (scope) {
return [
_c("el-input", {
model: {
value: scope.row.regularURL,
callback: function ($$v) {
_vm.$set(
scope.row,
"regularURL",
typeof $$v === "string" ? $$v.trim() : $$v
);
},
expression: "scope.row.regularURL",
},
}),
]
},
},
]),
}),
_vm._v(" "),
_c("el-table-column", {
attrs: { label: "描述" },
scopedSlots: _vm._u([
{
key: "default",
fn: function (scope) {
return [
_c("el-input", {
model: {
value: scope.row.desc,
callback: function ($$v) {
_vm.$set(
scope.row,
"desc",
typeof $$v === "string" ? $$v.trim() : $$v
);
},
expression: "scope.row.desc",
},
}),
]
},
},
]),
}),
_vm._v(" "),
_c("el-table-column", {
attrs: { align: "center", width: "300" },
scopedSlots: _vm._u([
{
key: "header",
fn: function () {
return [
_c("el-button", { on: { click: _vm.tableAddItemBut } }, [
_vm._v("添加"),
]),
_vm._v(" "),
_c("el-button", { on: { click: _vm.refreshBut } }, [
_vm._v("刷新"),
]),
_vm._v(" "),
_c(
"el-button",
{
attrs: { type: "success" },
on: { click: _vm.saveBut },
},
[_vm._v("保存")]
),
]
},
proxy: true,
},
{
key: "default",
fn: function (scope) {
return [
_c(
"el-tooltip",
{ attrs: { content: "以当前网页url用于验证匹配结果" } },
[
_c(
"el-button",
{
on: {
click: function ($event) {
return _vm.tableVerificationItemUrlBut(
scope.row.regularURL
)
},
},
},
[_vm._v("验证当前Url")]
),
],
1
),
_vm._v(" "),
_c(
"el-button",
{
attrs: { type: "danger" },
on: {
click: function ($event) {
return _vm.tableDelItemBut(scope.$index, scope.row)
},
},
},
[_vm._v("删除")]
),
]
},
},
]),
}),
],
1
),
],
1
)
};
var __vue_staticRenderFns__$6 = [];
__vue_render__$6._withStripped = true;
const __vue_inject_styles__$6 = undefined;
const __vue_scope_id__$6 = undefined;
const __vue_module_identifier__$6 = undefined;
const __vue_is_functional_template__$6 = false;
const __vue_component__$6 = normalizeComponent(
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
__vue_inject_styles__$6,
__vue_script__$6,
__vue_scope_id__$6,
__vue_is_functional_template__$6,
__vue_module_identifier__$6,
false,
undefined);const getPlayCountAndBulletChatAndDuration = (el) => {
const playInfo = el.querySelector(".playinfo").innerHTML.trim();
let nPlayCount = playInfo.match(/<\/svg>(.*)