Skip to content

Instantly share code, notes, and snippets.

View Dandu-Venkata-Ravi-Varma's full-sized avatar

Dandu Venkata Ravi varma Dandu-Venkata-Ravi-Varma

View GitHub Profile
@Dandu-Venkata-Ravi-Varma
Dandu-Venkata-Ravi-Varma / background.html
Created July 17, 2012 07:48
Developing a Chrome extension
<script type="text/JavaScript">
// Create a simple html notification:
setInterval(function() {
var notification = webkitNotifications.createHTMLNotification('notification.html');
notification.show();
}, 3600000);
@Dandu-Venkata-Ravi-Varma
Dandu-Venkata-Ravi-Varma / extension.js
Created July 13, 2012 17:24
Custom action on specific pages
function redirectTo(url) {
// Display new page
window.location = url;
}
function displyImage(imgURL) {
// Displays a Image
var $ = $jquery;
var img = $("<img />");
img.attr({
"src" : imgURL
@Dandu-Venkata-Ravi-Varma
Dandu-Venkata-Ravi-Varma / extension.js
Created July 13, 2012 17:19
Google Search Result Highlighting
function displayMessage(message, callback) {
// Display an alert-like message
var $ = $jquery;
if (isTesting)
console.log(message);
var bg = $('<div/>').appendTo("body");
bg.css({
"position" : "fixed",
"top" : 0,
"left" : 0,