Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exlg/mod-meta-discussion-guide

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exlg/mod-meta-discussion-guide - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/bundle.js

@@ -1,1 +0,1 @@

"use strict";(()=>{var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var b=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var m=(s,e,n)=>new Promise((i,t)=>{var o=l=>{try{a(n.next(l))}catch(p){t(p)}},r=l=>{try{a(n.throw(l))}catch(p){t(p)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(s,e)).next())});var c=u(()=>{"use strict"});var g=u(()=>{c()});var h=b(x=>{g();utils.mustMatch("/discuss/lists");var M="432028",y=[/exlg/i,/ex(tend)?[- ]luogu/i,/badge/i],E=$("#newpost"),w=$(".lg-input-title"),d=$("#submitpost"),L=d.wrap("<div></div>").parent(),f=`<a href="/discuss/${M}"><b>\u4E13\u8D34</b></a>`;E.after(`<p>exlg \u76F8\u5173\u95EE\u9898\u8BF7\u5728 ${f} \u8BA8\u8BBA</p>`);L[0].addEventListener("click",s=>{let e=markdownPalettes.content.toLowerCase(),n=w.val(),i=y.map(t=>{var o,r;return[(o=e.match(t))==null?void 0:o[0],(r=n.match(t))==null?void 0:r[0]]}).flat().filter((t,o,r)=>t&&t!==r[o+1]);if(i.length){s.stopPropagation();let t;utils.simpleAlert(`\u68C0\u6D4B\u5230\u60A8\u5C06\u8981\u53D1\u9001\u7684\u8BA8\u8BBA\u5185\u5BB9\u5305\u542B\u4E0E exlg \u6709\u5173\u7684\u5173\u952E\u8BCD\uFF1A<br />${i.map(o=>`\u201C${o}\u201D`).join(", ")}<br />\u5EFA\u8BAE\u524D\u5F80 ${f} \u8BA8\u8BBA\u3002<br />\u8FD9\u662F\u4E3A\u4E86\u9632\u6B62\u5360\u7528\u8BA8\u8BBA\u8D44\u6E90\uFF0C\u8425\u9020\u4E00\u4E2A\u66F4\u9AD8\u8D28\u91CF\u7684\u793E\u533A\u3002 <br />\u6211\u4EEC\u5F88\u62C5\u5FC3 exlg \u76F8\u5173\u8BA8\u8BBA\u9738\u5360\u7248\u9762\uFF0C\u9020\u6210\u8D1F\u9762\u5F71\u54CD\u3002<br /><span style="color: orange"><b>\u6D1B\u8C37\u7BA1\u7406\u5458\u63D0\u9192\u60A8\uFF1A\u53D1\u5E03\u65E0\u610F\u4E49\u8BA8\u8BBA\u53EF\u80FD\u5BFC\u81F4\u7981\u8A00\u3002</b> <br /><small>* \u65E0\u610F\u4E49\u8BA8\u8BBA\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u201C\u5927\u5BB6\u770B\u5F97\u5230\u6211\u7684 badge \u5417\u201D \u7B49\u7B49</small></span> <br />\u5982\u679C\u60A8\u786E\u5B9A\u8981\u53D1\u9001\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u952E\u5165 \u201C\u653E\u5FC3\u201D \u540E\u786E\u5B9A\u3002<br /><small class="comment">\uFF08\u8F93\u5165\u6846\u8FC7\u4E00\u4F1A\u624D\u4F1A\u51FA\u73B0\uFF09</small>`,{onAccept:()=>!t||t.val()!=="\u653E\u5FC3"?!1:(setTimeout(()=>d.trigger("click"),500),!0),onOpen:o=>m(x,null,function*(){yield utils.sleep(3e3),$(o).find("small.comment").remove(),t=$('<input type="text" />').appendTo(o)})})}},!0)});h();})();
"use strict";(()=>{var p=(i,l,n)=>new Promise((r,t)=>{var e=o=>{try{a(n.next(o))}catch(c){t(c)}},s=o=>{try{a(n.throw(o))}catch(c){t(c)}},a=o=>o.done?r(o.value):Promise.resolve(o.value).then(e,s);a((n=n.apply(i,l)).next())});utils.mustMatch(/^\/discuss\/lists\?forumname=/,{withSearch:!0});var g="432028",d=[/exlg/i,/ex(tend)?[- ]luogu/i,/badge/i],b=$("#newpost"),f=$(".lg-input-title"),u=$("#submitpost"),x=u.wrap("<div></div>").parent(),m=`<a href="/discuss/${g}"><b>\u4E13\u8D34</b></a>`;b.after(`<p>exlg \u76F8\u5173\u95EE\u9898\u8BF7\u5728 ${m} \u8BA8\u8BBA</p>`);x[0].addEventListener("click",i=>{let l=markdownPalettes.content.toLowerCase(),n=f.val(),r=d.map(t=>{var e,s;return[(e=l.match(t))==null?void 0:e[0],(s=n.match(t))==null?void 0:s[0]]}).flat().filter((t,e,s)=>t&&t!==s[e+1]);if(r.length){i.stopPropagation();let t;utils.simpleAlert(`\u68C0\u6D4B\u5230\u60A8\u5C06\u8981\u53D1\u9001\u7684\u8BA8\u8BBA\u5185\u5BB9\u5305\u542B\u4E0E exlg \u6709\u5173\u7684\u5173\u952E\u8BCD\uFF1A<br />${r.map(e=>`\u201C${e}\u201D`).join(", ")}<br />\u5EFA\u8BAE\u524D\u5F80 ${m} \u8BA8\u8BBA\u3002<br />\u8FD9\u662F\u4E3A\u4E86\u9632\u6B62\u5360\u7528\u8BA8\u8BBA\u8D44\u6E90\uFF0C\u8425\u9020\u4E00\u4E2A\u66F4\u9AD8\u8D28\u91CF\u7684\u793E\u533A\u3002 <br />\u6211\u4EEC\u5F88\u62C5\u5FC3 exlg \u76F8\u5173\u8BA8\u8BBA\u9738\u5360\u7248\u9762\uFF0C\u9020\u6210\u8D1F\u9762\u5F71\u54CD\u3002<br /><span style="color: orange"><b>\u6D1B\u8C37\u7BA1\u7406\u5458\u63D0\u9192\u60A8\uFF1A\u53D1\u5E03\u65E0\u610F\u4E49\u8BA8\u8BBA\u53EF\u80FD\u5BFC\u81F4\u7981\u8A00\u3002</b> <br /><small>* \u65E0\u610F\u4E49\u8BA8\u8BBA\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u201C\u5927\u5BB6\u770B\u5F97\u5230\u6211\u7684 badge \u5417\u201D \u7B49\u7B49</small></span> <br />\u5982\u679C\u60A8\u786E\u5B9A\u8981\u53D1\u9001\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u952E\u5165 \u201C\u653E\u5FC3\u201D \u540E\u786E\u5B9A\u3002<br /><small class="comment">\uFF08\u8F93\u5165\u6846\u8FC7\u4E00\u4F1A\u624D\u4F1A\u51FA\u73B0\uFF09</small>`,{onAccept:()=>!t||t.val()!=="\u653E\u5FC3"?!1:(setTimeout(()=>u.trigger("click"),500),!0),onOpen:e=>p(void 0,null,function*(){yield utils.sleep(3e3),$(e).find("small.comment").remove(),t=$('<input type="text" />').appendTo(e)})})}},!0);var h=1,M=2;})();

@@ -1,2 +0,2 @@

define({"entry":()=>{"use strict";(()=>{var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var b=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var m=(s,e,n)=>new Promise((i,t)=>{var o=l=>{try{a(n.next(l))}catch(p){t(p)}},r=l=>{try{a(n.throw(l))}catch(p){t(p)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(s,e)).next())});var c=u(()=>{"use strict"});var g=u(()=>{c()});var h=b(x=>{g();utils.mustMatch("/discuss/lists");var M="432028",y=[/exlg/i,/ex(tend)?[- ]luogu/i,/badge/i],E=$("#newpost"),w=$(".lg-input-title"),d=$("#submitpost"),L=d.wrap("<div></div>").parent(),f=`<a href="/discuss/${M}"><b>\u4E13\u8D34</b></a>`;E.after(`<p>exlg \u76F8\u5173\u95EE\u9898\u8BF7\u5728 ${f} \u8BA8\u8BBA</p>`);L[0].addEventListener("click",s=>{let e=markdownPalettes.content.toLowerCase(),n=w.val(),i=y.map(t=>{var o,r;return[(o=e.match(t))==null?void 0:o[0],(r=n.match(t))==null?void 0:r[0]]}).flat().filter((t,o,r)=>t&&t!==r[o+1]);if(i.length){s.stopPropagation();let t;utils.simpleAlert(`\u68C0\u6D4B\u5230\u60A8\u5C06\u8981\u53D1\u9001\u7684\u8BA8\u8BBA\u5185\u5BB9\u5305\u542B\u4E0E exlg \u6709\u5173\u7684\u5173\u952E\u8BCD\uFF1A<br />${i.map(o=>`\u201C${o}\u201D`).join(", ")}<br />\u5EFA\u8BAE\u524D\u5F80 ${f} \u8BA8\u8BBA\u3002<br />\u8FD9\u662F\u4E3A\u4E86\u9632\u6B62\u5360\u7528\u8BA8\u8BBA\u8D44\u6E90\uFF0C\u8425\u9020\u4E00\u4E2A\u66F4\u9AD8\u8D28\u91CF\u7684\u793E\u533A\u3002 <br />\u6211\u4EEC\u5F88\u62C5\u5FC3 exlg \u76F8\u5173\u8BA8\u8BBA\u9738\u5360\u7248\u9762\uFF0C\u9020\u6210\u8D1F\u9762\u5F71\u54CD\u3002<br /><span style="color: orange"><b>\u6D1B\u8C37\u7BA1\u7406\u5458\u63D0\u9192\u60A8\uFF1A\u53D1\u5E03\u65E0\u610F\u4E49\u8BA8\u8BBA\u53EF\u80FD\u5BFC\u81F4\u7981\u8A00\u3002</b> <br /><small>* \u65E0\u610F\u4E49\u8BA8\u8BBA\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u201C\u5927\u5BB6\u770B\u5F97\u5230\u6211\u7684 badge \u5417\u201D \u7B49\u7B49</small></span> <br />\u5982\u679C\u60A8\u786E\u5B9A\u8981\u53D1\u9001\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u952E\u5165 \u201C\u653E\u5FC3\u201D \u540E\u786E\u5B9A\u3002<br /><small class="comment">\uFF08\u8F93\u5165\u6846\u8FC7\u4E00\u4F1A\u624D\u4F1A\u51FA\u73B0\uFF09</small>`,{onAccept:()=>!t||t.val()!=="\u653E\u5FC3"?!1:(setTimeout(()=>d.trigger("click"),500),!0),onOpen:o=>m(x,null,function*(){yield utils.sleep(3e3),$(o).find("small.comment").remove(),t=$('<input type="text" />').appendTo(o)})})}},!0)});h();})();
define({"entry":()=>{"use strict";(()=>{var p=(i,l,n)=>new Promise((r,t)=>{var e=o=>{try{a(n.next(o))}catch(c){t(c)}},s=o=>{try{a(n.throw(o))}catch(c){t(c)}},a=o=>o.done?r(o.value):Promise.resolve(o.value).then(e,s);a((n=n.apply(i,l)).next())});utils.mustMatch(/^\/discuss\/lists\?forumname=/,{withSearch:!0});var g="432028",d=[/exlg/i,/ex(tend)?[- ]luogu/i,/badge/i],b=$("#newpost"),f=$(".lg-input-title"),u=$("#submitpost"),x=u.wrap("<div></div>").parent(),m=`<a href="/discuss/${g}"><b>\u4E13\u8D34</b></a>`;b.after(`<p>exlg \u76F8\u5173\u95EE\u9898\u8BF7\u5728 ${m} \u8BA8\u8BBA</p>`);x[0].addEventListener("click",i=>{let l=markdownPalettes.content.toLowerCase(),n=f.val(),r=d.map(t=>{var e,s;return[(e=l.match(t))==null?void 0:e[0],(s=n.match(t))==null?void 0:s[0]]}).flat().filter((t,e,s)=>t&&t!==s[e+1]);if(r.length){i.stopPropagation();let t;utils.simpleAlert(`\u68C0\u6D4B\u5230\u60A8\u5C06\u8981\u53D1\u9001\u7684\u8BA8\u8BBA\u5185\u5BB9\u5305\u542B\u4E0E exlg \u6709\u5173\u7684\u5173\u952E\u8BCD\uFF1A<br />${r.map(e=>`\u201C${e}\u201D`).join(", ")}<br />\u5EFA\u8BAE\u524D\u5F80 ${m} \u8BA8\u8BBA\u3002<br />\u8FD9\u662F\u4E3A\u4E86\u9632\u6B62\u5360\u7528\u8BA8\u8BBA\u8D44\u6E90\uFF0C\u8425\u9020\u4E00\u4E2A\u66F4\u9AD8\u8D28\u91CF\u7684\u793E\u533A\u3002 <br />\u6211\u4EEC\u5F88\u62C5\u5FC3 exlg \u76F8\u5173\u8BA8\u8BBA\u9738\u5360\u7248\u9762\uFF0C\u9020\u6210\u8D1F\u9762\u5F71\u54CD\u3002<br /><span style="color: orange"><b>\u6D1B\u8C37\u7BA1\u7406\u5458\u63D0\u9192\u60A8\uFF1A\u53D1\u5E03\u65E0\u610F\u4E49\u8BA8\u8BBA\u53EF\u80FD\u5BFC\u81F4\u7981\u8A00\u3002</b> <br /><small>* \u65E0\u610F\u4E49\u8BA8\u8BBA\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u201C\u5927\u5BB6\u770B\u5F97\u5230\u6211\u7684 badge \u5417\u201D \u7B49\u7B49</small></span> <br />\u5982\u679C\u60A8\u786E\u5B9A\u8981\u53D1\u9001\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u952E\u5165 \u201C\u653E\u5FC3\u201D \u540E\u786E\u5B9A\u3002<br /><small class="comment">\uFF08\u8F93\u5165\u6846\u8FC7\u4E00\u4F1A\u624D\u4F1A\u51FA\u73B0\uFF09</small>`,{onAccept:()=>!t||t.val()!=="\u653E\u5FC3"?!1:(setTimeout(()=>u.trigger("click"),500),!0),onOpen:e=>p(void 0,null,function*(){yield utils.sleep(3e3),$(e).find("small.comment").remove(),t=$('<input type="text" />').appendTo(e)})})}},!0);var h=1,M=2;})();
}})
{
"name": "@exlg/mod-meta-discussion-guide",
"description": "引导用户前往转贴讨论 exlg 相关问题",
"author": "ForkKILLET",
"version": "1.0.0",
"main": "src/index.ts",
"dependencies": {
"@exlg/core": "^1.0.2",
"@types/jquery": "^3.5.14"
},
"devDependencies": {
"@exlg/cli-mod": "^1.0.3"
}
}
"name": "@exlg/mod-meta-discussion-guide",
"description": "引导用户前往转贴讨论 exlg 相关问题",
"author": "ForkKILLET",
"version": "1.0.1",
"main": "src/index.ts",
"keywords": [
"exlg",
"exlg-module"
],
"dependencies": {
"@exlg/core": "^1.2.2",
"@types/jquery": "^3.5.14"
},
"devDependencies": {
"@exlg/cli-mod": "^1.2.1"
},
"scripts": {
"build": "exlg-mod build",
"build:dev": "exlg-mod build -c",
"prepublish": "exlg-mod clean && exlg-mod build"
}
}
import '@exlg/core/types/module-entry'
utils.mustMatch('/discuss/lists')
utils.mustMatch(/^\/discuss\/lists\?forumname=/, { withSearch: true })
const meta_discussion_id = '432028'
const metaDiscussionId = '432028'
const metaWordRegex = [/exlg/i, /ex(tend)?[- ]luogu/i, /badge/i]

@@ -14,4 +14,4 @@

// Note: 添加专贴说明和链接
const discuss_link = `<a href="/discuss/${meta_discussion_id}"><b>专贴</b></a>`
$newpostSection.after(`<p>exlg 相关问题请在 ${discuss_link} 讨论</p>`)
const discussLink = `<a href="/discuss/${metaDiscussionId}"><b>专贴</b></a>`
$newpostSection.after(`<p>exlg 相关问题请在 ${discussLink} 讨论</p>`)

@@ -35,3 +35,3 @@ // Note: 识别 "exlg" 关键字,引导用户去专贴讨论

`${existMetaWords.map((s) => `“${s}”`).join(', ')}<br />` +
`建议前往 ${discuss_link} 讨论。<br />` +
`建议前往 ${discussLink} 讨论。<br />` +
'这是为了防止占用讨论资源,营造一个更高质量的社区。 <br />' +

@@ -66,1 +66,4 @@ '我们很担心 exlg 相关讨论霸占版面,造成负面影响。<br />' +

) // Note: 使用事件捕获
export const a = 1
export const b = 2
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc