IceCubesApp/IceCubesActionExtension/Action.js
Thomas Durand 8cac9df8c6
Action extension that would open a deep link in the app (#423)
* Early version of an action that would open a deeplink in the app

* Extend routeur support + catch deeplinks

* Cleaning extension code, using what local packages has to offer

* Removed useless stuff from the extension

* Added action icon ; Thanks Dall-E for the icon

* Added the action name within a localizable file

* Fix routeur

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-27 20:35:16 +01:00

22 lines
470 B
JavaScript

//
// Action.js
// IceCubesActionExtension
//
// Created by Thomas Durand on 26/01/2023.
//
var Action = function() {};
Action.prototype = {
run: function(arguments) {
arguments.completionFunction({ "url" : document.URL })
},
finalize: function(arguments) {
var openingUrl = arguments["deeplink"]
if (openingUrl) {
document.location.href = openingUrl
}
}
};
var ExtensionPreprocessingJS = new Action