serializeArray already does exactly that. You just need to massage the data into your required format:
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
// check if browser window has focus
var notIE = (document.documentMode === undefined),
isChromium = window.chrome;
if (notIE && !isChromium) {
// checks for Firefox and other NON IE Chrome versions
$(window).on("focus", function() {
// tween resume() code goes here
setTimeout(function(){
console.log("focus");
},300);
}).on("blur", function() {
// tween pause() code goes here
console.log("blur");
});
} else {
// checks for IE and Chromium versions
if (window.addEventListener) {
// bind focus event
window.addEventListener("focus", function(event) {
// tween resume() code goes here
setTimeout(function(){
console.log("focus");
}, 300);
}, false);
// bind blur event
window.addEventListener("blur", function(event) {
// tween pause() code goes here
console.log("blur");
}, false);
} else {
// bind focus event
window.attachEvent("focus", function(event) {
// tween resume() code goes here
setTimeout(function(){
console.log("focus");
}, 300);
});
// bind focus event
window.attachEvent("blur", function(event) {
// tween pause() code goes here
console.log("blur");
});
}
}
Works in Ubuntu based systems.
You should disable them using either systemctl
(if you're using systemd
) or update-rc.d
:
systemctl disable apache2 mysql
or
update-rc.d apache2 disable
update-rc.d mysql disable
Warning! This will REMOVE the service!
sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
One of my favorite things about Linux is customization. There are many ways to customize it, and the most interesting of them all is the icons. Though they don’t change your entire interface, they can change the way you see your desktop. Icons make you feel at home, and no theme feels quite as complete without them.
Icon themes can be installed in two ways. You can install your icons to the system directory, effectively making your icon theme accessible to every user on the system. Alternatively, it’s possible to just enable it for one user only.
Download an icon theme of your choice and extract the files inside the archive. For instance, if you’ve chosen to download Dalisha (see the link below), you’d be extracting “Dalisha_2_2.tar.gz”. Once extracted, a folder will appear (in this case it’s called Dalisha). Open a terminal window and enter the command(s) below to install the icon themes.
Installing systemwide
sudo mv /path/to/icon/theme/folder/ /usr/share/icons/ -r
Installing for one user
mv /path/to/icon/theme/folder/ ~/.icons -r
Once the theme has been installed, enable the icon theme inside your desktop environment with the DE’s own configuration tool. Or, using your tool of choice. If you are not sure what tool to use, check out Gnome Tweak Tool (it works with most GTK desktops). If you’re on KDE, just open the KDE application menu and search icons. It should be pretty straight-forward.
Now, check out some of the beautiful icon themes below.
5-beautiful-icon-themes-for-linux
Extra:
There are two different ways to install GTK themes. You can install the theme to the root theme directory which will make your new theme available to all users on the system. Alternatively, it’s possible to just install the theme to your home directory for your own use.
For example: If you wanted to install the Iris Dark theme, you’d go to the download page and get the theme’s .zip file. Once you have it downloaded, extract it, move the folder to your home directory and open a terminal window.
Installing GTK theme system wide
sudo mv ~/gtk-theme-folder/ /usr/share/themes/ -r
Installing GTK theme for one user
mv ~/gtk-theme-folder/ ~/.themes -r
Note: The .themes
folder is hidden by default. If it does not exist, create it.
Once your theme is installed, you can go to the System Settings to change the theme.
Are you picky when it comes to GTK themes? Are you interested in a more modern style theme? Here’s a collection of some of the best designed, sleek and modern GTK themes on the Internet.