1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-08 14:46:42 +01:00
mastodon-app-ufficiale-ipho.../OpenInActionExtension/Action.js

31 lines
627 B
JavaScript
Raw Normal View History

//
// Action.js
// OpenInActionExtension
//
// Created by Marcus Kida on 03.01.23.
//
var Action = function() {};
Action.prototype = {
run: function(arguments) {
var payload = {
"url": document.documentURI
}
arguments.completionFunction(payload)
},
finalize: function(arguments) {
const alertMessage = arguments["alert"]
const openURL = arguments["openURL"]
if (alertMessage) {
alert(alertMessage)
} else if (openURL) {
window.location = openURL
}
}
};
var ExtensionPreprocessingJS = new Action