Skip to content

Instantly share code, notes, and snippets.

View ajankovic's full-sized avatar

Aleksandar Janković ajankovic

  • 90poe
  • Belgrade, Serbia
View GitHub Profile
@ajankovic
ajankovic / current_viewed_node.php
Created April 25, 2012 16:32
Get current viewed node if available
<?php
/**
* Used to get the current viewed node (works when viewed in page mode).
* @param array $node_types[optional] A filter on the type of node you want to see.
* @return object The node or null if not successfull.
*/
function helper_get_current_node($node_types = array()) {
// Store the current node id, to avoid doing the URL testing
// on every call to this function. I didn't store the node itself
// because I was afraid of data changes during page processing.
@ajankovic
ajankovic / chrasks.js
Created January 22, 2011 11:58
Copy paste from Chrasks plugin
/*
Author: Aleksandar Janković, [email protected]
Description: Main javascript file for Google Chrome plugin Chrasks. It uses
localStorage technology for saving tasks data.
*/
// Declaring Chrasks object
function Chrasks(){
var me = this;
this.taskForm = document.getElementById('task-form');