fixes i forgot

This commit is contained in:
Cynthia Foxwell 2018-06-16 09:03:45 -06:00
parent 98524a3c20
commit 9070d97d6d
2 changed files with 3 additions and 4 deletions

View file

@ -6,8 +6,7 @@ exports.manifest = {
exports.start = function(){
document.addEventListener("dblclick", ev => {
let target = ev.target;
console.log(target);
if(target && target.className && (target.className.includes("markup") || target.className.includes("hljs") || targe.className.includes("inline"))) {
if(target && target.className && (target.className.includes("markup") || target.className.includes("hljs") || target.className.includes("inline"))) {
let msg = target;
if(!ev.ctrlKey){
let opt = msg.parentNode.parentNode.className.includes("markup") ? msg.parentNode.parentNode.parentNode.querySelector(".btn-option") : msg.parentNode.querySelector(".btn-option");

View file

@ -16,7 +16,7 @@ exports = {
author: "Cynosphere",
name: "Plugins Repo",
description: "Download plugins.",
_version: 3
_version: 4
},
getInfo: async function(plugin){
@ -66,7 +66,7 @@ exports = {
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 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){
internal.print(`Update found for ${info.name} (${id}).`);