Skip to content

Commit

Permalink
fix permission issue
Browse files Browse the repository at this point in the history
closes #25
  • Loading branch information
ardittristan committed Feb 5, 2022
1 parent 254169e commit 52f5c10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.8.3

* fix issue when user doesn't have permissions to view settings.

## 2.8.0

* add parameter that allows for changing the order of the color settings button.
Expand Down
4 changes: 3 additions & 1 deletion colorSetting.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,11 @@ async function getEyeDropper(event, _this) {
// settings formatting watcher
async function _settingsWatcher(_this) {
Hooks.on('renderSettingsConfig', (settingsEvent) => {
let element = document.querySelector(`div.settings-list div.form-group.submenu button[data-key="${_this.module}.${_this.key}"]`);
if (!element) return;

pickerShown = {};
(() => {
let element = document.querySelector(`div.settings-list div.form-group.submenu button[data-key="${_this.module}.${_this.key}"]`);
const color = game.settings.get(_this.module, _this.key);
element.style.backgroundColor = color;
element.style.color = getTextColor(color);
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "colorsettings",
"title": "lib - Color Settings",
"description": "Library that allows modules to add color settings and forms.",
"version": "2.8.2",
"version": "2.8.3",
"library": true,
"author": "ardittristan#0001",
"esmodules": ["colorSetting.js"],
Expand Down Expand Up @@ -33,7 +33,7 @@
"manifest": "https://raw.githubusercontent.com/ardittristan/VTTColorSettings/master/module.json",
"download": "https://github.com/ardittristan/VTTColorSettings/releases/latest/download/colorSettings.zip",
"minimumCoreVersion": "0.5.5",
"compatibleCoreVersion": "9.238",
"compatibleCoreVersion": "9",
"styles": [
"./css/colorpicker.css"
]
Expand Down

0 comments on commit 52f5c10

Please sign in to comment.