From c123aa4679ff39730498bc2a7d3ffd2aefdd7805 Mon Sep 17 00:00:00 2001 From: N0rdye Date: Sun, 1 Oct 2023 21:48:12 +0500 Subject: [PATCH] color change fix --- db.js | 2 +- views/project.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.js b/db.js index 8464580..b733043 100644 --- a/db.js +++ b/db.js @@ -1,6 +1,6 @@ const mysql = require('mysql'); const vars = require('./vars'); -const db_host = "db"; +const db_host = "localhost"; const admin = mysql.createConnection({ host: db_host, diff --git a/views/project.ejs b/views/project.ejs index 3aaa159..e2427f8 100644 --- a/views/project.ejs +++ b/views/project.ejs @@ -393,7 +393,7 @@ if (proj_state == "loaded"){objs_back.push(JSON.parse(JSON.stringify(objs)));} let obj = (in_obj == null)? document.getElementById(cur_obj):in_obj; // console.log(color); - color_change(color,obj.getAttribute("img"),(img)=>{ + color_change(color,obj.getAttribute("data-img"),(img)=>{ obj.src = img; obj.setAttribute("color",color) objs[obj.classList[0]][obj.id]["color"] = color;