Button to call multiple class anchor click events only calls one then gives unhelping error
I have written a greasemonkey script to customise the way I browse theawesomer.com. I wanted to have a little button I could click next to the post to store the link in a list so I could copy and paste the list into an email and send it to myself for later viewing. I have an email button in another version of the script which automates this fine, I just removed it from this post as it wasn't relevant.

The problem: I have this 'Remove All' button which should, using a jquery class selector, call the click event handler for each of the elements it finds. The click event removes a link in the list and the associated remove link button (not the 'Remove All' button). However it only removes the top item from the list and then throws an error saying 'Component not found' but doesn't point to a line in my code. Can anyone help me find out what is going wrong and how to fix it?

    // ==UserScript==
    // @name           TheAwesomerLaterLink
    // @namespace      theawesomer
    // @include        http://theawesomer.com/*
    // @include        http://www.theawesomer.com/*
    // @require        https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js
    // ==/UserScript==
        
    function addStyle(style)
    {
        var head = document.getElementsByTagName("head")[0];
        var element = head.appendChild(document.createElement('style'));
        element.innerHTML = style;
        return element;    
    }
    
    function createLinkInList(link, thisElement) // link = original link/buy anchor, thisElement = this post's new anchor (add button)
    {
        var removeButton = $(document.createElement('img'))
                            .attr('src', 'http://alphadesigns.com.au/greasemonkey/removeButton.png')
                            .attr('title', 'Remove LaterLink')
                            .attr('alt', 'Remove LaterLink')
                            .css(
                            {
                                width: '16px',
                                heigth: '16px',
                                float: 'right'
                            });
                            
        var removeLink = $(document.createElement('a'))
                        .addClass('removeLink')
                        .attr('rel', link.parents('.post').attr('id'))
                        .attr('title', 'Remove LaterLink')
                        .css('cursor', 'pointer')
                        .append(removeButton)
                        .click(function(e)
                        {
                            GM_log('start');
                            e.preventDefault();
                            
                            // Restore add button if on same page still
                            if($('#' + $(this).attr('rel')).length > 0)
                            {
                                var laterLink = $('#' + $(this).attr('rel')).find('.LaterLink');
                                laterLink.find('img').attr('src', 'http://alphadesigns.com.au/greasemonkey/addButton.png');
                                laterLink.unbind('click').click(function(e2)
                                {
                                    e2.preventDefault();
                                    createLinkInList(link, laterLink);
                                });
                            }
                            
                            // Remove from list of links
                            $(this).parent().remove();
                            GM_log('end');
                        });
                        
        var itemLink = $(document.createElement('a'))
                       .addClass('itemLink')
                       .text(link.parent().prev('h2').find('a').text())
                       .attr('href', link.attr('href'));
        
        var span = $(document.createElement('span'))
                        .append(itemLink)
                        .append(removeLink)
                        .append($(document.createElement('br')));
                        
        $('#laterLinkList').append(span);
        
        $(thisElement).find('img').attr('src', 'http://alphadesigns.com.au/greasemonkey/disabledButton.png');
                
        $(thisElement).unbind('click');
    }
    
    $(document).ready(function()
    {
        // Remove Ads
        $('#adside').next().remove();
        $('#adside').remove();
        
        // Create Links
        $('.post .topmeta a').each(function()
        {
            var link = $(this);
            if(link.attr('title') == 'Link' || link.attr('title') == 'Buy')
            {
                // Track inclusion
                var insertionPoint = $(this).parent()
                                            .siblings('.metabar')
                                            .find('.rightmetabar > span:last');
                
                // Check if we've already added a link for 'Link' or 'Buy' link
                if(insertionPoint.find('.LaterLink').length == 0)
                {
                    newAnchor = $(document.createElement('a'))
                                .attr('rel', link.attr('href'))
                                .attr('class', 'LaterLink')
                                .attr('title', 'LaterLink')
                                .css('cursor', 'pointer')
                                .click(function(e)
                                {
                                    e.preventDefault();
                                    createLinkInList(link, this);
                                });
                                
                    newImage = $(document.createElement('img'))
                                .addClass('icon')
                                .attr('src', 'http://alphadesigns.com.au/greasemonkey/addButton.png')
                                .attr('title', 'LaterLink')
                                .attr('alt', 'LaterLink')
                                .css(
                                {
                                    width: '16px',
                                    height: '16px',
                                    marginRight: '3px'
                                });
                    
                    newAnchor.append(newImage);
                    
                    // Put link in metabar next to other share links
                    insertionPoint.prepend(newAnchor);
                }
            }
        });
        
        // Create List
        var panel = $('<div id="actionPanel"><div class="tab"><ul class="tabUL"><li class="left">&nbsp;</li><li id="toggle"><a id="open" class="open">LinkLater</a><a id="close" style="display: none;" class="close">Close</a></li><li class="right">&nbsp;</li></ul></div><div id="actionPanelContent"><div class="content clearfix"><input id="removeAll" type="button" value="Remove All" /><div id="laterLinkList" class="left"></div></div></div></div>');
        
        // Attach panel to body
        $(document.body).not('iframe body').append(panel);
        
        // Attach 'remove all' function
        $('#removeAll').css({margin: '0 15px', float: 'right'})
                        .click(function(e)
                        {
                            e.preventDefault();
                            $('.removeLink').click();
                            return false;
                        });
        
        // Expand Panel
        $("#open").click(function(e)
        {
            e.preventDefault();
            $("#actionPanelContent").slideDown("fast");
        });    
        
        // Collapse Panel
        $("#close").click(function(e)
        {
            e.preventDefault();
            $("#actionPanelContent").slideUp("fast");
        });
        
        // Switch button from "Open" to "Close" on click
        $("#toggle a").click(function(e)
        {
            e.preventDefault();
            $("#toggle a").toggle();
        });
    
        // Apply stylesheet to panel
        addStyle('@import "http://alphadesigns.com.au/greasemonkey/TheAwesomerLaterLink.css";');
    });
Button to call multiple class anchor click events only calls one then gives unhelping error
===

I have written a greasemonkey script to customise the way I browse theawesomer.com. I wanted to have a little button I could click next to the post to store the link in a list so I could copy and paste the list into an email and send it to myself for later viewing. I have an email button in another version of the script which automates this fine, I just removed it from this post as it wasn't relevant.

The problem: I have this 'Remove All' button which should, using a jquery class selector, call the click event handler for each of the elements it finds. The click event removes a link in the list and the associated remove link button (not the 'Remove All' button). However it only removes the top item from the list and then throws an error saying 'Component not found' but doesn't point to a line in my code. Can anyone help me find out what is going wrong and how to fix it?

    // ==UserScript==
    // @name           TheAwesomerLaterLink
    // @namespace      theawesomer
    // @include        http://theawesomer.com/*
    // @include        http://www.theawesomer.com/*
    // @require        https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js
    // ==/UserScript==
        
    function addStyle(style)
    {
        var head = document.getElementsByTagName("head")[0];
        var element = head.appendChild(document.createElement('style'));
        element.innerHTML = style;
        return element;    
    }
    
    function createLinkInList(link, thisElement) // link = original link/buy anchor, thisElement = this post's new anchor (add button)
    {
        var removeButton = $(document.createElement('img'))
                            .attr('src', 'http://alphadesigns.com.au/greasemonkey/removeButton.png')
                            .attr('title', 'Remove LaterLink')
                            .attr('alt', 'Remove LaterLink')
                            .css(
                            {
                                width: '16px',
                                heigth: '16px',
                                float: 'right'
                            });
                            
        var removeLink = $(document.createElement('a'))
                        .addClass('removeLink')
                        .attr('rel', link.parents('.post').attr('id'))
                        .attr('title', 'Remove LaterLink')
                        .css('cursor', 'pointer')
                        .append(removeButton)
                        .click(function(e)
                        {
                            GM_log('start');
                            e.preventDefault();
                            
                            // Restore add button if on same page still
                            if($('#' + $(this).attr('rel')).length > 0)
                            {
                                var laterLink = $('#' + $(this).attr('rel')).find('.LaterLink');
                                laterLink.find('img').attr('src', 'http://alphadesigns.com.au/greasemonkey/addButton.png');
                                laterLink.unbind('click').click(function(e2)
                                {
                                    e2.preventDefault();
                                    createLinkInList(link, laterLink);
                                });
                            }
                            
                            // Remove from list of links
                            $(this).parent().remove();
                            GM_log('end');
                        });
                        
        var itemLink = $(document.createElement('a'))
                       .addClass('itemLink')
                       .text(link.parent().prev('h2').find('a').text())
                       .attr('href', link.attr('href'));
        
        var span = $(document.createElement('span'))
                        .append(itemLink)
                        .append(removeLink)
                        .append($(document.createElement('br')));
                        
        $('#laterLinkList').append(span);
        
        $(thisElement).find('img').attr('src', 'http://alphadesigns.com.au/greasemonkey/disabledButton.png');
                
        $(thisElement).unbind('click');
    }
    
    $(document).ready(function()
    {
        // Remove Ads
        $('#adside').next().remove();
        $('#adside').remove();
        
        // Create Links
        $('.post .topmeta a').each(function()
        {
            var link = $(this);
            if(link.attr('title') == 'Link' || link.attr('title') == 'Buy')
            {
                // Track inclusion
                var insertionPoint = $(this).parent()
                                            .siblings('.metabar')
                                            .find('.rightmetabar > span:last');
                
                // Check if we've already added a link for 'Link' or 'Buy' link
                if(insertionPoint.find('.LaterLink').length == 0)
                {
                    newAnchor = $(document.createElement('a'))
                                .attr('rel', link.attr('href'))
                                .attr('class', 'LaterLink')
                                .attr('title', 'LaterLink')
                                .css('cursor', 'pointer')
                                .click(function(e)
                                {
                                    e.preventDefault();
                                    createLinkInList(link, this);
                                });
                                
                    newImage = $(document.createElement('img'))
                                .addClass('icon')
                                .attr('src', 'http://alphadesigns.com.au/greasemonkey/addButton.png')
                                .attr('title', 'LaterLink')
                                .attr('alt', 'LaterLink')
                                .css(
                                {
                                    width: '16px',
                                    height: '16px',
                                    marginRight: '3px'
                                });
                    
                    newAnchor.append(newImage);
                    
                    // Put link in metabar next to other share links
                    insertionPoint.prepend(newAnchor);
                }
            }
        });
        
        // Create List
        var panel = $('<div id="actionPanel"><div class="tab"><ul class="tabUL"><li class="left">&nbsp;</li><li id="toggle"><a id="open" class="open">LinkLater</a><a id="close" style="display: none;" class="close">Close</a></li><li class="right">&nbsp;</li></ul></div><div id="actionPanelContent"><div class="content clearfix"><input id="removeAll" type="button" value="Remove All" /><div id="laterLinkList" class="left"></div></div></div></div>');
        
        // Attach panel to body
        $(document.body).not('iframe body').append(panel);
        
        // Attach 'remove all' function
        $('#removeAll').css({margin: '0 15px', float: 'right'})
                        .click(function(e)
                        {
                            e.preventDefault();
                            $('.removeLink').click();
                            return false;
                        });
        
        // Expand Panel
        $("#open").click(function(e)
        {
            e.preventDefault();
            $("#actionPanelContent").slideDown("fast");
        });    
        
        // Collapse Panel
        $("#close").click(function(e)
        {
            e.preventDefault();
            $("#actionPanelContent").slideUp("fast");
        });
        
        // Switch button from "Open" to "Close" on click
        $("#toggle a").click(function(e)
        {
            e.preventDefault();
            $("#toggle a").toggle();
        });
    
        // Apply stylesheet to panel
        addStyle('@import "http://alphadesigns.com.au/greasemonkey/TheAwesomerLaterLink.css";');
    });