Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

673 lines
21 KiB

4 years ago
  1. /**
  2. * @name BetterCodeblocks
  3. * @invite undefined
  4. * @authorLink undefined
  5. * @donate undefined
  6. * @patreon undefined
  7. * @website https://github.com/vBread/BetterCodeblocks
  8. * @source https://github.com/vBread/BetterCodeblocks/blob/master/BetterCodeblocks.plugin.js
  9. */
  10. /*@cc_on
  11. @if (@_jscript)
  12. // Offer to self-install for clueless users that try to run this directly.
  13. var shell = WScript.CreateObject("WScript.Shell");
  14. var fs = new ActiveXObject("Scripting.FileSystemObject");
  15. var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\BetterDiscord\plugins");
  16. var pathSelf = WScript.ScriptFullName;
  17. // Put the user at ease by addressing them in the first person
  18. shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
  19. if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
  20. shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
  21. } else if (!fs.FolderExists(pathPlugins)) {
  22. shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
  23. } else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
  24. fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
  25. // Show the user where to put plugins in the future
  26. shell.Exec("explorer " + pathPlugins);
  27. shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
  28. }
  29. WScript.Quit();
  30. @else@*/
  31. module.exports = (() => {
  32. const config = { "info": { "name": "BetterCodeblocks", "authors": [{ "name": "Bread", "discord_id": "304260051915374603" }], "version": "1.0.0", "description": "Enhances the look and feel of Discord's codeblocks with customizable colors", "github": "https://github.com/vBread/BetterCodeblocks", "github_raw": "https://github.com/vBread/BetterCodeblocks/blob/master/BetterCodeblocks.plugin.js" }, "changelog": [], "main": "index.js" };
  33. return !global.ZeresPluginLibrary ? class {
  34. constructor() { this._config = config; }
  35. getName() { return config.info.name; }
  36. getAuthor() { return config.info.authors.map(a => a.name).join(", "); }
  37. getDescription() { return config.info.description; }
  38. getVersion() { return config.info.version; }
  39. load() {
  40. BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click Download Now to install it.`, {
  41. confirmText: "Download Now",
  42. cancelText: "Cancel",
  43. onConfirm: () => {
  44. require("request").get("https://rauenzi.github.io/BDPluginLibrary/release/0PluginLibrary.plugin.js", async (error, response, body) => {
  45. if (error) return require("electron").shell.openExternal("https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js");
  46. await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r));
  47. });
  48. }
  49. });
  50. }
  51. start() {}
  52. stop() {}
  53. } : (([Plugin, Api]) => {
  54. const plugin = (Plugin, Library) => {
  55. const { Patcher, WebpackModules, DiscordModules, PluginUtilities, Settings } = Library;
  56. const { SettingPanel, SettingGroup, Textbox } = Settings
  57. const { React, hljs } = DiscordModules
  58. return class BetterCodeblocks extends Plugin {
  59. constructor() {
  60. super()
  61. this.defaults = {
  62. addition: '#98c379',
  63. attr_1: '#d19a66',
  64. attr_2: '#d19a66',
  65. attribute: '#98c379',
  66. background: '#282c34',
  67. built_in: '#e6c07b',
  68. bullet: '#61aeee',
  69. code: '#abb2bf',
  70. comment: '#5c6370',
  71. deletion: '#e06c75',
  72. doctag: '#c678dd',
  73. keyword: '#c678dd',
  74. literal: '#56b6c2',
  75. meta_string: '#98c379',
  76. meta: '#61aeee',
  77. name: '#e06c75',
  78. nomarkup: '#98c379',
  79. number: '#d19a66',
  80. params: '#abb2bf',
  81. quote: '#5c6370',
  82. regexp: '#98c379',
  83. section: '#e06c75',
  84. selector_attr: '#d19a66',
  85. selector_class: '#d19a66',
  86. selector_id: '#61aeee',
  87. selector_pseudo: '#d19a66',
  88. selector_tag: '#e06c75',
  89. string: '#98c379',
  90. subst: '#e06c75',
  91. symbol: '#61aeee',
  92. tag: '#e06c75',
  93. template_variable: '#d19a66',
  94. text: '#abb2bf',
  95. title: '#61aeee',
  96. type: '#d19a66',
  97. variable: '#d19a66'
  98. }
  99. this.hljs = PluginUtilities.loadSettings('BetterCodeblocks', this.defaults)
  100. }
  101. onStart() {
  102. const parser = WebpackModules.getByProps('parse', 'parseTopic')
  103. Patcher.after(parser.defaultRules.codeBlock, 'react', (_, args, res) => {
  104. this.inject(args, res)
  105. return res
  106. });
  107. PluginUtilities.addStyle('BetterCodeblocks', this.css)
  108. }
  109. onStop() {
  110. PluginUtilities.removeStyle('BetterCodeblocks')
  111. Patcher.unpatchAll();
  112. }
  113. getSettingsPanel() {
  114. return SettingPanel.build(PluginUtilities.saveSettings('BetterCodeblocks', this.hljs),
  115. new SettingGroup('Customization').append(
  116. new Textbox('Additions', 'Changes the color of additions for Diff', this.hljs.addition, (color) => this.updateColor('addition', color)),
  117. new Textbox('Annotation Tags', 'Changes the color of documentation/annotation tags', this.hljs.doctag, (color) => this.updateColor('doctag', color)),
  118. new Textbox('Attributes', 'Changes the color of HTML tag attributes', this.hljs.attribute, (color) => this.updateColor('attribute', color)),
  119. new Textbox('Background', 'Changes the color of the codeblock background', this.hljs.background, (color) => this.updateColor('background', color)),
  120. new Textbox('Built-In', 'Changes the color of built-in keywords', this.hljs.built_in, (color) => this.updateColor('built_in', color)),
  121. new Textbox('Bullets', 'Changes the color of bullet points for Markdown', this.hljs.bullet, (color) => this.updateColor('bullet', color)),
  122. new Textbox('Comments', 'Changes the color of comments', this.hljs.comment, (color) => this.updateColor('comment', color)),
  123. new Textbox('Deletions', 'Changes the color of deletions for Diff', this.hljs.deletion, (color) => this.updateColor('deletion', color)),
  124. new Textbox('Keywords', 'Changes the color of keywords', this.hljs.keyword, (color) => this.updateColor('keyword', color)),
  125. new Textbox('Literals', 'Changes the color of literal keywords', this.hljs.literal, (color) => this.updateColor('literal', color)),
  126. new Textbox('Names', 'Changes the color of function names', this.hljs.title, (color) => this.updateColor('title', color)),
  127. new Textbox('Number', 'Changes the color of numbers', this.hljs.number, (color) => this.updateColor('number', color)),
  128. new Textbox('Parameters', 'Changes the color of function parameters', this.hljs.params, (color) => this.updateColor('params', color)),
  129. new Textbox('Regular Expressions', 'Changes the color of regular expressions', this.hljs.regexp, (color) => this.updateColor('regexp', color)),
  130. new Textbox('Selector Attributes', 'Changes the color of CSS selector attributes', this.hljs.selector_attr, (color) => this.updateColor('selector_attr', color)),
  131. new Textbox('Selector Classes', 'Changes the color of CSS selector classes', this.hljs.selector_class, (color) => this.updateColor('selector_class', color)),
  132. new Textbox('Selector IDs', 'Changes the color of CSS selector IDs', this.hljs.selector_id, (color) => this.updateColor('selector_id', color)),
  133. new Textbox('Selector Pseudos', 'Changes the color of CSS selector pseudos', this.hljs.selector_pseudo, (color) => this.updateColor('selector_pseudo', color)),
  134. new Textbox('Selector Tags', 'Changes the color of CSS selector tags', this.hljs.selector_tag, (color) => this.updateColor('selector_tag', color)),
  135. new Textbox('Strings', 'Changes the color of strings', this.hljs.string, (color) => this.updateColor('string', color)),
  136. new Textbox('Template Literals', 'Changes the color of template literals', this.hljs.template_variable, (color) => this.updateColor('template_variable', color)),
  137. new Textbox('Types', 'Changes the color of types', this.hljs.type, (color) => this.updateColor('type', color)),
  138. new Textbox('Variables', 'Changes the color of variables', this.hljs.variable, (color) => this.updateColor('variable', color)),
  139. )
  140. )
  141. }
  142. updateColor(property, color) {
  143. let reset = false
  144. if (!/#?\w{6}/.test(color) || color === '') {
  145. color = this.defaults[property]
  146. reset = true
  147. }
  148. if (!color.startsWith('#')) {
  149. color = `#${color}`
  150. }
  151. this.hljs[property] = color
  152. if (reset) PluginUtilities.saveSettings('BetterCodeblocks', this.hljs)
  153. PluginUtilities.removeStyle('BetterCodeblocks')
  154. PluginUtilities.addStyle('BetterCodeblocks', this.css)
  155. }
  156. inject(args, res) {
  157. const { render } = res.props;
  158. res.props.render = (props) => {
  159. const codeblock = render(props);
  160. const codeElement = codeblock.props.children;
  161. const classes = codeElement.props.className.split(' ');
  162. const lang = args ? args[0].lang : classes[classes.indexOf('hljs') + 1];
  163. const lines = codeElement.props.dangerouslySetInnerHTML
  164. ? codeElement.props.dangerouslySetInnerHTML.__html
  165. .replace(
  166. /<span class="(hljs-[a-z]+)">([^<]*)<\/span>/g,
  167. (_, className, code) => code.split('\n').map(l => `<span class="${className}">${l}</span>`).join('\n')
  168. )
  169. .split('\n')
  170. : codeElement.props.children.split('\n');
  171. delete codeElement.props.dangerouslySetInnerHTML;
  172. codeElement.props.children = this.render(lang, lines);
  173. return codeblock;
  174. };
  175. }
  176. render(lang, lines) {
  177. const { Messages } = WebpackModules.getByProps('Messages')
  178. if (hljs && typeof hljs.getLanguage === 'function') {
  179. lang = hljs.getLanguage(lang);
  180. }
  181. return React.createElement(React.Fragment, null,
  182. lang && React.createElement('div', { className: 'bd-codeblock-lang' }, lang.name),
  183. React.createElement('table', { className: 'bd-codeblock-table' },
  184. ...lines.map((line, i) => React.createElement('tr', null,
  185. React.createElement('td', null, i + 1),
  186. React.createElement('td',
  187. lang ? {
  188. dangerouslySetInnerHTML: {
  189. __html: line
  190. }
  191. } : {
  192. children: line
  193. }
  194. )
  195. ))
  196. ),
  197. React.createElement('button', {
  198. className: 'bd-codeblock-copy-btn',
  199. onClick: this.clickHandler
  200. }, Messages.COPY)
  201. );
  202. }
  203. clickHandler({ target }) {
  204. const { Messages } = WebpackModules.getByProps('Messages')
  205. const { clipboard } = require('electron')
  206. if (target.classList.contains('copied')) return;
  207. target.innerText = Messages.ACCOUNT_USERNAME_COPY_SUCCESS_1;
  208. target.classList.add('copied');
  209. setTimeout(() => {
  210. target.innerText = Messages.COPY;
  211. target.classList.remove('copied');
  212. }, 1e3);
  213. const code = [...target.parentElement.querySelectorAll('td:last-child')].map(t => t.textContent).join('\n');
  214. clipboard.writeText(code);
  215. }
  216. get css() {
  217. return `
  218. .hljs {
  219. background-color: ${this.hljs.background} !important;
  220. color: ${this.hljs.text};
  221. position: relative;
  222. }
  223. .hljs:not([class$='hljs']) {
  224. padding-top: 2px;
  225. }
  226. .bd-codeblock-lang {
  227. color: var(--text-normal);
  228. border-bottom: 1px solid var(--background-modifier-accent);
  229. padding: 0 5px;
  230. margin-bottom: 6px;
  231. font-size: .8em;
  232. font-family: 'Raleway', sans-serif;
  233. font-weight: bold;
  234. }
  235. .bd-codeblock-table {
  236. border-collapse: collapse;
  237. }
  238. .bd-codeblock-table tr {
  239. height: 19px;
  240. width: 100%;
  241. }
  242. .bd-codeblock-table td:first-child {
  243. border-right: 1px solid var(--background-modifier-accent);
  244. padding-left: 5px;
  245. padding-right: 8px;
  246. user-select: none;
  247. }
  248. .bd-codeblock-table td:last-child {
  249. padding-left: 8px;
  250. word-break: break-all;
  251. }
  252. .bd-codeblock-copy-btn {
  253. color: #fff;
  254. border-radius: 4px;
  255. line-height: 20px;
  256. padding: 0 10px;
  257. font-family: 'Raleway', sans-serif;
  258. font-size: .8em;
  259. text-transform: uppercase;
  260. font-weight: bold;
  261. margin: 3px;
  262. background: var(--background-floating);
  263. position: absolute;
  264. right: 0 !important;
  265. bottom: 0 !important;
  266. opacity: 0;
  267. transition: .3s;
  268. }
  269. .bd-codeblock-copy-btn.copied {
  270. background-color: #43b581;
  271. opacity: 1;
  272. }
  273. .hljs:hover .bd-codeblock-copy-btn {
  274. opacity: 1;
  275. }
  276. // HLJS Styling
  277. .hljs > .bd-codeblock-table > tr > td > span > .hljs-tag {
  278. color: ${this.hljs.tag};
  279. }
  280. .hljs > .bd-codeblock-table > tr > td > span > .hljs-tag > .hljs-name {
  281. color: ${this.hljs.name};
  282. }
  283. .hljs > .bd-codeblock-table > tr > td > span > .hljs-tag > .hljs-attr {
  284. color: ${this.hljs.attr_2};
  285. }
  286. .hljs > .bd-codeblock-table > tr > td > .bash > .hljs-built_in {
  287. color: ${this.hljs.built_in};
  288. }
  289. .hljs > .bd-codeblock-table > tr > td > .bash > .hljs-variable {
  290. color: ${this.hljs.variable};
  291. }
  292. .hljs > .bd-codeblock-table > tr > td > .hljs-tag {
  293. color: ${this.hljs.tag} !important;
  294. }
  295. .hljs > .bd-codeblock-table > tr > td > .hljs-tag > .hljs-name {
  296. color: ${this.hljs.tag};
  297. }
  298. .hljs > .bd-codeblock-table > tr > td > .hljs-tag > .hljs-attr {
  299. color: ${this.hljs.tag};
  300. }
  301. .hljs > .bd-codeblock-table > tr > td > .hljs-function > .hljs-params {
  302. color: ${this.hljs.params};
  303. }
  304. .hljs > .bd-codeblock-table > tr > td > .hljs-function > .hljs-params > .hljs-type {
  305. color: ${this.hljs.type};
  306. }
  307. .hljs > .bd-codeblock-table > tr > td > .hljs-params {
  308. color: ${this.hljs.params};
  309. }
  310. .hljs > .bd-codeblock-table > tr > td > .hljs-params > .hljs-built_in {
  311. color: ${this.hljs.built_in};
  312. }
  313. .hljs > .bd-codeblock-table > tr > td > .hljs-selector-attr {
  314. color: ${this.hljs.selector_attr};
  315. }
  316. .hljs > .bd-codeblock-table > tr > td > .hljs-type {
  317. color: ${this.hljs.type};
  318. }
  319. .hljs > .bd-codeblock-table > tr > td > .hljs-selector-id {
  320. color: ${this.hljs.selector_id};
  321. }
  322. .hljs > .bd-codeblock-table > tr > td > .hljs-selector-pseudo {
  323. color: ${this.hljs.selector_pseudo};
  324. }
  325. .hljs > .bd-codeblock-table > tr > td > .hljs-bullet {
  326. color: ${this.hljs.bullet};
  327. }
  328. .hljs > .bd-codeblock-table > tr > td > .hljs-addition {
  329. color: ${this.hljs.addition};
  330. }
  331. .hljs > .bd-codeblock-table > tr > td > .hljs-deletion {
  332. color: ${this.hljs.deletion};
  333. }
  334. .hljs > .bd-codeblock-table > tr > td > .hljs-regexp {
  335. color: ${this.hljs.regexp};
  336. }
  337. .hljs > .bd-codeblock-table > tr > td > .hljs-doctag {
  338. color: ${this.hljs.doctag};
  339. }
  340. .hljs > .bd-codeblock-table > tr > td > .hljs-built_in {
  341. color: ${this.hljs.built_in};
  342. }
  343. .hljs > .bd-codeblock-table > tr > td > .hljs-attr {
  344. color: ${this.hljs.attr_1};
  345. }
  346. .hljs > .bd-codeblock-table > tr > td .hljs-nomarkup > span {
  347. color: ${this.hljs.nomarkup};
  348. }
  349. .hljs > .bd-codeblock-table > tr > td .hljs-section {
  350. color: ${this.hljs.section};
  351. }
  352. .hljs > .bd-codeblock-table > tr > td .hljs-meta {
  353. color: ${this.hljs.meta};
  354. }
  355. .hljs > .bd-codeblock-table > tr > td .hljs-literal {
  356. color: ${this.hljs.literal};
  357. }
  358. .hljs > .bd-codeblock-table > tr > td .hljs-title {
  359. color: ${this.hljs.title};
  360. }
  361. .hljs > .bd-codeblock-table > tr > td .hljs-keyword {
  362. color: ${this.hljs.keyword};
  363. }
  364. .hljs > .bd-codeblock-table > tr > td .hljs-selector-tag {
  365. color: ${this.hljs.selector_tag};
  366. }
  367. .hljs > .bd-codeblock-table > tr > td .hljs-selector-class {
  368. color: ${this.hljs.selector_class};
  369. }
  370. .hljs > .bd-codeblock-table > tr > td .hljs-attribute {
  371. color: ${this.hljs.attribute};
  372. }
  373. .hljs > .bd-codeblock-table > tr > td .hljs-symbol {
  374. color: ${this.hljs.symbol};
  375. }
  376. .hljs > .bd-codeblock-table > tr > td .hljs-number {
  377. color: ${this.hljs.number};
  378. }
  379. .hljs > .bd-codeblock-table > tr > td .hljs-string {
  380. color: ${this.hljs.string};
  381. }
  382. .hljs > .bd-codeblock-table > tr > td .hljs-subst {
  383. color: ${this.hljs.subst};
  384. }
  385. .hljs > .bd-codeblock-table > tr > td .hljs-code {
  386. color: ${this.hljs.code};
  387. }
  388. .hljs > .bd-codeblock-table > tr > td .hljs-comment {
  389. color: ${this.hljs.comment};
  390. }
  391. .hljs > .bd-codeblock-table > tr > td .hljs-quote {
  392. color: ${this.hljs.quote};
  393. }
  394. .hljs > .bd-codeblock-table > tr > td .hljs-variable {
  395. color: ${this.hljs.variable};
  396. }
  397. .hljs > .bd-codeblock-table > tr > td .hljs-template-variable {
  398. color: ${this.hljs.template_variable};
  399. }
  400. .hljs > .bd-codeblock-table > tr > td .hljs-meta-string {
  401. color: ${this.hljs.meta_string};
  402. }
  403. // Chat CB
  404. .codeLine-14BKbG > span > span {
  405. color: ${this.hljs.text};
  406. }
  407. .codeLine-14BKbG > span > span > span > .hljs-tag {
  408. color: ${this.hljs.tag};
  409. }
  410. .codeLine-14BKbG > span > span > span > .hljs-tag > .hljs-name {
  411. color: ${this.hljs.name};
  412. }
  413. .codeLine-14BKbG > span > span > span > .hljs-tag > .hljs-attr {
  414. color: ${this.hljs.attr_2};
  415. }
  416. .codeLine-14BKbG > span > span > .bash > .hljs-built_in {
  417. color: ${this.hljs.built_in};
  418. }
  419. .codeLine-14BKbG > span > span > .bash > .hljs-variable {
  420. color: ${this.hljs.variable};
  421. }
  422. .codeLine-14BKbG > span > span > .hljs-tag {
  423. color: ${this.hljs.tag} !important;
  424. }
  425. .codeLine-14BKbG > span > span > .hljs-tag > .hljs-name {
  426. color: ${this.hljs.tag};
  427. }
  428. .codeLine-14BKbG > span > span > .hljs-tag > .hljs-attr {
  429. color: ${this.hljs.tag};
  430. }
  431. .codeLine-14BKbG > span > span > .hljs-function > .hljs-params {
  432. color: ${this.hljs.params};
  433. }
  434. .codeLine-14BKbG > span > span > .hljs-function > .hljs-params > .hljs-type {
  435. color: ${this.hljs.type};
  436. }
  437. .codeLine-14BKbG > span > span > .hljs-params {
  438. color: ${this.hljs.params};
  439. }
  440. .codeLine-14BKbG > span > span > .hljs-params > .hljs-built_in {
  441. color: ${this.hljs.built_in};
  442. }
  443. .codeLine-14BKbG > span > span > .hljs-selector-attr {
  444. color: ${this.hljs.selector_attr};
  445. }
  446. .codeLine-14BKbG > span > span > .hljs-type {
  447. color: ${this.hljs.type};
  448. }
  449. .codeLine-14BKbG > span > span > .hljs-selector-id {
  450. color: ${this.hljs.selector_id};
  451. }
  452. .codeLine-14BKbG > span > span > .hljs-selector-pseudo {
  453. color: ${this.hljs.selector_pseudo};
  454. }
  455. .codeLine-14BKbG > span > span > .hljs-bullet {
  456. color: ${this.hljs.bullet};
  457. }
  458. .codeLine-14BKbG > span > span > .hljs-addition {
  459. color: ${this.hljs.addition};
  460. }
  461. .codeLine-14BKbG > span > span > .hljs-deletion {
  462. color: ${this.hljs.deletion};
  463. }
  464. .codeLine-14BKbG > span > span > .hljs-regexp {
  465. color: ${this.hljs.regexp};
  466. }
  467. .codeLine-14BKbG > span > span > .hljs-doctag {
  468. color: ${this.hljs.doctag};
  469. }
  470. .codeLine-14BKbG > span > span > .hljs-built_in {
  471. color: ${this.hljs.built_in};
  472. }
  473. .codeLine-14BKbG > span > span > .hljs-attr {
  474. color: ${this.hljs.attr_1};
  475. }
  476. .codeLine-14BKbG > span > span .hljs-nomarkup > span {
  477. color: ${this.hljs.nomarkup};
  478. }
  479. .codeLine-14BKbG > span > span .hljs-section {
  480. color: ${this.hljs.section};
  481. }
  482. .codeLine-14BKbG > span > span .hljs-meta {
  483. color: ${this.hljs.meta};
  484. }
  485. .codeLine-14BKbG > span > span .hljs-literal {
  486. color: ${this.hljs.literal};
  487. }
  488. .codeLine-14BKbG > span > span .hljs-title {
  489. color: ${this.hljs.title};
  490. }
  491. .codeLine-14BKbG > span > span .hljs-keyword {
  492. color: ${this.hljs.keyword};
  493. }
  494. .codeLine-14BKbG > span > span .hljs-selector-tag {
  495. color: ${this.hljs.selector_tag};
  496. }
  497. .codeLine-14BKbG > span > span .hljs-selector-class {
  498. color: ${this.hljs.selector_class};
  499. }
  500. .codeLine-14BKbG > span > span .hljs-attribute {
  501. color: ${this.hljs.attribute};
  502. }
  503. .codeLine-14BKbG > span > span .hljs-symbol {
  504. color: ${this.hljs.symbol};
  505. }
  506. .codeLine-14BKbG > span > span .hljs-number {
  507. color: ${this.hljs.number};
  508. }
  509. .codeLine-14BKbG > span > span .hljs-string {
  510. color: ${this.hljs.string};
  511. }
  512. .codeLine-14BKbG > span > span .hljs-subst {
  513. color: ${this.hljs.subst};
  514. }
  515. .codeLine-14BKbG > span > span .hljs-code {
  516. color: ${this.hljs.code};
  517. }
  518. .codeLine-14BKbG > span > span .hljs-comment {
  519. color: ${this.hljs.comment};
  520. }
  521. .codeLine-14BKbG > span > span .hljs-quote {
  522. color: ${this.hljs.quote};
  523. }
  524. .codeLine-14BKbG > span > span .hljs-variable {
  525. color: ${this.hljs.variable};
  526. }
  527. .codeLine-14BKbG > span > span .hljs-template-variable {
  528. color: ${this.hljs.template_variable};
  529. }
  530. .codeLine-14BKbG > span > span .hljs-meta-string {
  531. color: ${this.hljs.meta_string};
  532. }
  533. `
  534. }
  535. };
  536. };
  537. return plugin(Plugin, Api);
  538. })(global.ZeresPluginLibrary.buildPlugin(config));
  539. })();
  540. /*@end@*/