if ($_GET['widget'] != '1') {
return;
}
+ this.background = false;
+ if ($_GET.hasOwnProperty('background')) {
+ this.background = $_GET['background'];
+ if (this.background !== 'transparent' && this.background.indexOf('rgb') !== 0 && this.background.indexOf('#') !== 0) {
+ this.background = '#' + this.background;
+ }
+ }
this.action = $_GET.hasOwnProperty('action') ? $_GET['action'] : 'fullscreen';
this.enabled = true;
var $this = this;
},
enable: function () {
- console.log('enable widget mode');
+
$("body").addClass('widget');
- if ($_GET['background'] !== undefined) {
- $("#background,#splash").attr('style', 'background-color: ' + $_GET['background'] + ' !important;background-image:none !important');
+ if (this.background !== false) {
+ $("#background,#splash").attr('style', 'background-color: ' + this.background + ' !important;background-image:none !important');
}
},
disable: function () {
- console.log('disable widget mode');
$("body").removeClass('widget');
$("#background,#splash").attr('style', '');
},