mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-01 17:34:10 +02:00
Add extendFunction and refactor window.TD in code.js
This commit is contained in:
parent
82a3cd8df2
commit
82a1e17b1d
@ -1,4 +1,4 @@
|
|||||||
(function($,$TD){
|
(function($,$TD,TD){
|
||||||
//
|
//
|
||||||
// Constant: List of valid font size classes.
|
// Constant: List of valid font size classes.
|
||||||
//
|
//
|
||||||
@ -58,11 +58,11 @@
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
// Force popup notification settings
|
// Force popup notification settings
|
||||||
window.TD.controller.notifications.hasNotifications = function(){
|
TD.controller.notifications.hasNotifications = function(){
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
window.TD.controller.notifications.isPermissionGranted = function(){
|
TD.controller.notifications.isPermissionGranted = function(){
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -70,6 +70,17 @@
|
|||||||
isInitialized = true;
|
isInitialized = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Function: Appends code at the end of a function.
|
||||||
|
//
|
||||||
|
var extendFunction = function(func, extension){
|
||||||
|
return function(){
|
||||||
|
var res = func.apply(this,arguments);
|
||||||
|
extension.apply(this,arguments);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Function: Registers an observer to a TweetDeck column, which reports new tweets.
|
// Function: Registers an observer to a TweetDeck column, which reports new tweets.
|
||||||
//
|
//
|
||||||
@ -249,4 +260,4 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})($,$TD);
|
})($,$TD,TD);
|
||||||
|
Loading…
Reference in New Issue
Block a user