Source code for the WriteFreely SwiftUI app for iOS, iPadOS, and macOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
414 B

  1. var Action = function() {};
  2. Action.prototype = {
  3. run: function(parameters) {
  4. parameters.completionFunction({
  5. "URL": document.URL,
  6. "title": document.title,
  7. "selection": document.getSelection().toString()
  8. });
  9. },
  10. finalize: function(parameters) {
  11. var customJavaScript = parameters["customJavaScript"];
  12. eval(customJavaScript);
  13. }
  14. };
  15. var ExtensionPreprocessingJS = new Action