Skip to content

Instantly share code, notes, and snippets.

View sincerekamal's full-sized avatar

Kamalakannan Jayaraman sincerekamal

  • Bangalore
View GitHub Profile
@sincerekamal
sincerekamal / BadgeUtils
Last active September 13, 2015 07:34 — forked from Tadas44/BadgeUtils
Launcher icon notification for Samsung and Sony Xperia devices
public class BadgeUtils {
public static void setBadge(Context context, int count) {
setBadgeSamsung(context, count);
setBadgeSony(context, count);
}
public static void clearBadge(Context context) {
setBadgeSamsung(context, 0);
@sincerekamal
sincerekamal / gist:01a0a2290f50a4e77f62
Created April 7, 2015 14:58
Facebook Delete All Archived conversations at once
/**
Steps to follow:
1. Open facebook and navigate to archived messages
2. Open console and paste the below code
3. Press enter to run the code.
**/
(function() {
@sincerekamal
sincerekamal / Clear Chrome History
Last active June 7, 2018 05:44
Clear Chrome: browser history in the current view
(() => {
var ele = document.querySelector('history-app');
var historyItems = ele.shadowRoot.querySelector('history-list').shadowRoot.querySelector('iron-list').querySelectorAll('history-item');
historyItems.forEach((item) => { item.shadowRoot.querySelector('#checkmark').click(); });
ele.shadowRoot.querySelector('history-toolbar').shadowRoot.querySelector('cr-toolbar-selection-overlay').shadowRoot.querySelector('#delete').click();
var btnCont = ele.shadowRoot.querySelector('history-list').shadowRoot.querySelector('dialog').shadowRoot.children[3].querySelector('content[name="button-container"]');
btnCont.getDistributedNodes()[0].querySelector('.action-button').click();
})()