@@ -40,42 +40,33 @@ $(function () {
40
40
markup += '</table>' ;
41
41
markup += '</div>' ;
42
42
$ ( '#listContent' ) . html ( markup ) ;
43
- } ) ;
44
43
45
- $ ( 'body' ) . on ( 'click' , function ( evt ) {
46
- //evt.preventDefault();
47
- //evt.stopPropagation();
48
- if ( $ ( evt . currentTarget ) . hasClass ( 'clickListItem' ) ) {
49
- evt . preventDefault ( ) ;
50
- evt . stopPropagation ( ) ;
51
- console . log ( 'a.clickListItem' ) ;
52
- //chrome.tabs.create({url: $(evt.document.location.reload(true)currentTarget).attr("href")});
53
- }
44
+ $ ( 'a.clickListItem' ) . on ( 'click' , function ( evt ) {
45
+ evt . preventDefault ( ) ;
46
+ evt . stopPropagation ( ) ;
47
+ console . log ( 'a.clickListItem' ) ;
48
+ chrome . tabs . create ( { url : $ ( evt . currentTarget ) . attr ( "href" ) } ) ;
54
49
} ) ;
55
50
56
- $ ( 'body' ) . on ( 'click' , function ( evt ) {
57
- //evt.preventDefault();
58
- //evt.stopPropagation();
51
+ /*
52
+ $('a.removeListItem').on('click', function(evt) {
53
+ evt.preventDefault();
54
+ evt.stopPropagation();
59
55
console.log("removeListItem");
60
- if ( $ ( evt . currentTarget ) . hasClass ( 'removeListItem' ) ) {
61
- evt . preventDefault ( ) ;
62
- evt . stopPropagation ( ) ;
63
- //removeListItem($(evt.currentTarget).attr("href"));
64
- var url = $ ( evt . currentTarget ) . attr ( "href" ) ;
65
- chrome . extension . sendMesssage ( { removeDiff :true , url : url } , function ( response ) {
66
- /*
67
- if (response) {
68
- var notification = webkitNotifications.createNotification(
69
- 'icon.png', // icon url - can be relative
70
- 'WebPageDiff', // notification title
71
- response // notification body text
72
- );
73
- notification.show();
74
- }
75
- document.location.reload(true);
76
- */
77
- } ) ;
78
- }
56
+ var url = $(evt.currentTarget).attr("href");
57
+ chrome.extension.sendMesssage({removeDiff:true, url: url}, function(response) {
58
+ if (response) {
59
+ var notification = webkitNotifications.createNotification(
60
+ 'icon.png', // icon url - can be relative
61
+ 'WebPageDiff', // notification title
62
+ response // notification body text
63
+ );
64
+ notification.show();
65
+ }
66
+ document.location.reload(true);
67
+ });
79
68
});
69
+ */
70
+ } ) ;
80
71
} ) ;
81
72
0 commit comments