General Musing

blaze your trail

Posts Tagged ‘javascript

Proof of Concept: Google Docs Mail Merge Form with Text and HTML #wordpress

leave a comment »

I needed a way to be able to shamelessly plug the posts I recently bundled into the booklet “Write Something” again.In a similar way to the last time I did it in Proof of Concept: Google Docs Mail Merge Form

As I explained before I have set up a system to automatically mail somebody when the enter their address in the form, my issue was that I wanted to add a unique blogpost which they would only be able to get by signing up. Naturally I wanted to style it in the same way the posts are styled in this blog. Again I turned to the documentation, specifically the Class MailApp which I was using to send the mail. Using this documentation I had a starting point. I wanted three changes to the current script:

  1. keep the plain text
  2. add HTML message
  3. add inline images

Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

February 24, 2012 at 12:50 pm

Proof of Concept: Google Docs Mail Merge Form #wordpress #updated

leave a comment »

I needed a way to be able to shamelessly plug the posts I recently bundled into the booklet “Write Something“. I want to build a list, and offering something which adds value for the subscriber is a good way to do this. There is a host of good material which you can use to help, so I won’t elaborate on that in this post.

I have a hosted WordPress.com blog, which means that I can’t run a local script to collect the mail addresses and mail them, so I turned to Google Docs’ Form functionality for the entry form, naturally I give them the option to download the booklet there, and I wanted to send the subscriber a message to thank them. In the Google tutorial: Simple Mail Merge they explain how to do a mail merge using the Script Editor. I wanted to go a little further and have it send a mail with thank you note and a link to each subscriber as soon as they filled in the form.

Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

January 23, 2012 at 9:59 pm

6 Months of Security Links #2011

I’m a regular curator of daily links, and like to give overviews of my collection of curated links and posts. This is partly as there are some good sources and articles in here and as I am working on a research project which I started based on a number of books I read.

I’m sure you’ll find something interesting in the items below – there are some gems in the list – and I dare to hazard the guess you might learn something you wanted to know. :)

Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

July 15, 2011 at 4:10 pm

Posted in tagging

Tagged with , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

This year’s articles about programming #2010

Programming Hands

In 2010 I was less focussed on programming articles on the blog than previous years, still I have managed to create some interesting articles with code in 2010. This is an overview of the activity:

Having some fun today with QR codes, JavaScript and the Google Analytics URL …

The only questions that are asked in the Daily Scrum, aka Stand-Up, are: What…

UPDATE: GMail has introduced my number 3. YEAH! (Gmail introduces Priority In…

I like YouTube, and often subscribe to new channels and unsubscribe after a w…

Since I started working for my company I’ve been exposed to PCI DSS (Pa…

I don’t understand why url expansion after url shortening is such an is…

VeriSign – Personal Identity Portal is a OpenID provider with multiple …

Image source D’Arcy Norman

TIME’s poor “Person of the Year” poll #web2.0 @time

Time Magazine Logo

I’ve been voting in “Who Will Be TIME’s 2010 Person of the Year?” The way it’s set up I need to remember that I gave certain people certain points; Mark Zuckerberg 78; Hamid Karzai – 15; Julian Assange – 90; Glenn Beck – 77; etc. Wouldn’t it be better to rate them in order?

It’s quite simple really: drag and drop the names and/or images or names of the candidates in the order of the ranking and based on that TIME can actually rank all the people correctly. When you believe Karzai is more influential than Jobs, put him first; less influential than Assange put him after. It’s really not much harder than that.

Please enter this century TIME, it’s not so scary here.

Written by Daniël W. Crompton (webhat)

December 6, 2010 at 6:01 pm

Sync Web with Phone #html #javascript #scratchpad

Having some fun today with , JavaScript and the Google Analytics URL Builder to produce an image which can be used to sync the webpage you are on to your phone using a QR code.

document.write("<img src=\"http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl="+ escape(document.href) +"&choe=UTF-8\">");

Naturally the Javascript code should probably be more DOM oriented, but this was just for fun!

Written by Daniël W. Crompton (webhat)

September 29, 2010 at 12:51 pm

Posted in mashup, mobile, programming, tagging

Tagged with , ,

YouTube Channel Unsubscribe #bookmarklet

I like , and often subscribe to new channels and unsubscribe after a while. There is a lot of good stuff on YouTube, and a lot of rubbish. YouTube has been smart in making it possible to easily add channels, and in my opinion they have put less thought into making it easy to leave the channels. In the case of multiple channels I would either need to go to each of the channels and remove them one by one, or I would go to My Feeds / My Subscriptions and remove them one by one from there. In both cases I need to modify the subscription settings shown below.

Editing the YouTube channel subscription

Editing the YouTube channel subscription

My issue with this is not that it takes a long time, although that is certainly a small factor. Or that having subscription management for a channel is overkill when I just want to leave a channel. Personally I believe that it should be manageable from one page, just push of a button, like subscribing. And it wasn’t, until today.

Read the rest of this entry »

Written by Daniël W. Crompton (webhat)

May 22, 2010 at 8:14 pm

Chrome Beta Breaks Internet? #chrome

I hate programming UIs in browsers, I’m sure everybody does. With Google’s Chrome browser another headache is born. Chrome’s JavaScript Engine V8 implements ECMAScript-262, but not with some of the features that come in JavaScript v1.6 and are implemented by FireFox. One example is the “for each in,” not that this is implemented correctly in Internet Explorer.

var query = "plaap=poekoe&hi=hello";
var valPairs = query.split('&');

for each (var pair in valPairs) {
Uncaught SyntaxError: Unexpected identifier
        var tempPair = pair.split('=');
}

There is a solution for this I found on the Mozilla Developers Center: forEach, with this you are able to implement a callback that cycles throught the Element.

if (!Array.prototype.forEach){
  Array.prototype.forEach = function(fun /*, thisp*/) {
    var len = this.length;
    if (typeof fun != "function")
      throw new TypeError();

    var thisp = arguments[1];
    for (var i = 0; i < len; i++) {
      if (i in this)
        fun.call(thisp, this[i], i, this);
    }
  };
}

Technorati technorati tags: , , , , , , ,

Written by Daniël W. Crompton (webhat)

December 1, 2008 at 12:20 pm

Clipperz, Online Password Share

I was trying to think about what to say about SlideShare, so I was browsing the site to give me inspiration, it didn’t work.

What I did find was Clipperz, Clipperz makes it possible to login with one click. The username and password for the site is stored encrypted at Clipperz and is decrypted and posted to the site. I’ll use the example of /., the bookmarklet provided extracts the form and uses that to populate the login form.

{
  "page": {"title": "Slashdot: News for nerds, stuff that matters"},
  "form": {
    "attributes": {"action": "http://slashdot.org/login.pl", "method": "post"},
    "inputs":[
      {"type": "text",     "name": "unickname",   "value": "username"},
      {"type": "hidden",   "name": "returnto",    "value": "//slashdot.org/"},
      {"type": "hidden",   "name": "op", "value": "userlogin"},
      {"type": "password", "name": "upasswd",     "value": "password"},
      {"type": "checkbox", "name": "login_temp",  "value": "yes"},
      {"type": "submit",   "name": "userlogin",   "value": "Log in"}]
    },
  "version": "0.2.3"
}

To be entirely portable you can access the websites from a sidebar in your browser. Naturally this is a nice proof of concept for the real product they are selling: zero-knowledge web applications.

Zero-knowledge web applications is about making web applications more secure. Do you trust Google Documents with your confidential documents? You shouldn’t unless the data is stored without the knowledge of the SaaS provider. Clipperz password manager is the first zero-knowledge web application. This means that Clipperz knows nothing about its users and their data. They do this using a JavaScript library, based on Ajax and browser-based cryptography, which can be used to build applications that users can can use to manage their private data.

Technorati technorati tags: , , , , ,

Written by Daniël W. Crompton (webhat)

July 26, 2008 at 8:07 pm

Bookmarklet Fix

For whatever reason one of my FireFox bookmarklets to toggle checkboxes stopped working, so I wrote a new one. ( I can’t post it as a link as Yahoo! 360° doesn’t allow javascript links. )

javascript:(function(){ var i,t,x=document.getElementsByTagName("INPUT"); for( i=0; i < x.length; i++) {if(x[i].type == "checkbox") { t = x[i].onchange; x[i].onchange=null; x[i].checked=!x[i].checked; x[i].onchange=t;}}})();

You have to copy this code, all on one line and paste it into a new bookmark location field.

technorati tags: ,

Written by Daniël W. Crompton (webhat)

June 23, 2006 at 12:32 am

Posted in firefox, programming

Tagged with ,

Follow

Get every new post delivered to your Inbox.