mirror of
https://github.com/EndPwnArchive/EndPwn3Plugins.git
synced 2024-08-14 23:57:06 +00:00
fixes i forgot
This commit is contained in:
parent
98524a3c20
commit
9070d97d6d
2 changed files with 3 additions and 4 deletions
|
@ -6,8 +6,7 @@ exports.manifest = {
|
||||||
exports.start = function(){
|
exports.start = function(){
|
||||||
document.addEventListener("dblclick", ev => {
|
document.addEventListener("dblclick", ev => {
|
||||||
let target = ev.target;
|
let target = ev.target;
|
||||||
console.log(target);
|
if(target && target.className && (target.className.includes("markup") || target.className.includes("hljs") || target.className.includes("inline"))) {
|
||||||
if(target && target.className && (target.className.includes("markup") || target.className.includes("hljs") || targe.className.includes("inline"))) {
|
|
||||||
let msg = target;
|
let msg = target;
|
||||||
if(!ev.ctrlKey){
|
if(!ev.ctrlKey){
|
||||||
let opt = msg.parentNode.parentNode.className.includes("markup") ? msg.parentNode.parentNode.parentNode.querySelector(".btn-option") : msg.parentNode.querySelector(".btn-option");
|
let opt = msg.parentNode.parentNode.className.includes("markup") ? msg.parentNode.parentNode.parentNode.querySelector(".btn-option") : msg.parentNode.querySelector(".btn-option");
|
||||||
|
|
|
@ -16,7 +16,7 @@ exports = {
|
||||||
author: "Cynosphere",
|
author: "Cynosphere",
|
||||||
name: "Plugins Repo",
|
name: "Plugins Repo",
|
||||||
description: "Download plugins.",
|
description: "Download plugins.",
|
||||||
_version: 3
|
_version: 4
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfo: async function(plugin){
|
getInfo: async function(plugin){
|
||||||
|
@ -66,7 +66,7 @@ exports = {
|
||||||
if(fs.existsSync(`${$api.data}/plugins/${id}.js`)){
|
if(fs.existsSync(`${$api.data}/plugins/${id}.js`)){
|
||||||
var p = fs.readFileSync(`${$api.data}/plugins/${id}.js`).toString().replace(/\r\n/g,"\n").trim();
|
var p = fs.readFileSync(`${$api.data}/plugins/${id}.js`).toString().replace(/\r\n/g,"\n").trim();
|
||||||
var np = await (await fetch(baseurl+id+'.js?_=' + Date.now())).text();
|
var np = await (await fetch(baseurl+id+'.js?_=' + Date.now())).text();
|
||||||
np=np.trim();
|
np=np.toString().replace(/\r\n/g,"\n").trim();
|
||||||
|
|
||||||
if(p !== np){
|
if(p !== np){
|
||||||
internal.print(`Update found for ${info.name} (${id}).`);
|
internal.print(`Update found for ${info.name} (${id}).`);
|
||||||
|
|
Loading…
Reference in a new issue