This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keys = Object.keys(localStorage); | |
var total = 0; | |
for (var i in keys) { | |
var key = keys[i]; | |
var size = localStorage[key].length; | |
console.log(key, ' size ', getReadableFileSizeString(size)); | |
total += size; | |
} | |
console.log('\n-------\ntotal size ', getReadableFileSizeString(total)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class providing caching for data objects. | |
* | |
* It's assumed that the data comes from some remote service (otherwise there is no point in caching). | |
* | |
* @param {String} dataKey Globally(!) unique key to store data. | |
* @param {Storage} storageService Storage service that should have two functions: | |
* storageService.set(key, value) -- set data | |
* storageService.get(key) -- get data | |
* Will attempt fallback to `$.jStorage` if not secified. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pad class. | |
* | |
* @author Maciej "Nux" Jaros | |
* @license CC-BY | |
* | |
* Note! The class becomes faster with new itterations. | |
*/ | |
NuxPadder = function (character) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id iitc-plugin-keyhunt-keys@3ch01c | |
// @name IITC plugin: keyhunt-keys | |
// @category Misc | |
// @version 0.0.3.20160405.143600 | |
// @namespace https://github.com/3ch01c/ingress-intel-total-conversion | |
// @description This is a plugin which assists you in hunting keys from certain area. Effectively allows to tick a portal for which you have a key. Switch to "keyhunt" highlighter (included in this plugin) to show in red which keys you are still missing (the portal for which you haven't entered data yet will be orange, other will be green). Use 'sync' plugin to share data between multiple browsers or desktop/mobile. Use keyhunt plugin with 'portals-list' plugin to quickly tick many portals on a list. | |
// @include https://www.ingress.com/intel* | |
// @include http://www.ingress.com/intel* | |
// @match https://www.ingress.com/intel* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global Ext */ | |
/** | |
* Restore filters grid plugin. | |
* | |
* To use this plugin just add to your grid | |
* 1. `'Ext.ux.grid.RestoreFilters'` in `requires` property | |
* 2. `ptype: 'gridrestorefilters'` in `plugins` property | |
* 3. and `restoreableFilters` array as a setting for the plugin (see below) | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global Ext */ | |
/** | |
* Cascade window position plugin. | |
* | |
* To use this plugin just add to your window | |
* 1. `'Ext.ux.CascadeWindows'` in `requires` property | |
* 2. `ptype: 'cascadewindows'` in `plugins` property | |
* | |
* @author Maciej "Nux" Jaros |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IE | |
this.openCurrentUrl("c:\\Program Files\\Internet Explorer\\iexplore.exe"); | |
// Firefox Developer Edition | |
this.openCurrentUrl("C:\\Program Files\\Mozilla\\Firefox Developer Edition\\firefox.exe"); | |
// Chrome | |
this.openCurrentUrl("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"); | |
// Edge | |
// for whatever reason this doesn't work for local files (i.e. "file:///...") | |
this.openCurrentUrl("c:\\windows\\system32\\cmd.exe", ["/c", "start", "microsoft-edge:%u"]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.smartOpenWebPanel("Translate", "https://translate.google.pl/"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Simple Frame Postman | |
version 1.1.2 | |
Author: Maciej "Nux" Jaros | |
License: CC-BY or MIT (at ones choosing) | |
Usage (simple setup): | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Helps applying default filter values from grid to store. | |
* | |
* @example In your window with grid you could do: | |
* <pre> | |
initComponent: function() { | |
this.callParent(); | |
// apply default filters from grid to store | |
var grid = this.down('grid'); |