mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
22 lines
527 B
JavaScript
22 lines
527 B
JavaScript
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
|