mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Made the color picker an IIFE
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
//=include History.js
|
||||
|
||||
//=include ColorModule.js
|
||||
//=include _drawLine.js
|
||||
|
||||
//=include Tool.js
|
||||
|
||||
@ -37,7 +36,6 @@
|
||||
//=include layers/PixelGrid.js
|
||||
|
||||
//=include Startup.js
|
||||
//=include _pixelGrid.js
|
||||
//=include EditorState.js
|
||||
//=include ToolManager.js
|
||||
|
||||
@ -46,7 +44,6 @@
|
||||
//=include data/palettes.js
|
||||
|
||||
/**functions**/
|
||||
//=include _checkerboard.js
|
||||
//=include _resizeCanvas.js
|
||||
//=include _resizeSprite.js
|
||||
//=include _colorPicker.js
|
||||
@ -124,4 +121,19 @@ window.onbeforeunload = function() {
|
||||
return 'You will lose your pixel if it\'s not saved!';
|
||||
|
||||
else return;
|
||||
};
|
||||
};
|
||||
|
||||
// Compatibility functions
|
||||
function closeCompatibilityWarning() {
|
||||
document.getElementById("compatibility-warning").style.visibility = "hidden";
|
||||
}
|
||||
|
||||
//check browser/version
|
||||
if (
|
||||
(bowser.firefox && bowser.version >= 28) ||
|
||||
(bowser.chrome && bowser.version >= 29) ||
|
||||
(!bowser.mobile && !bowser.tablet)
|
||||
)
|
||||
console.log("compatibility check passed");
|
||||
//show warning
|
||||
else document.getElementById("compatibility-warning").style.visibility = "visible";
|
||||
|
Reference in New Issue
Block a user