Safari script redirect - JS

Exported by ChatGPT Exporter at 2023-04-30T17:17:38.730Z

Metadata
You

Generate a userscript for safari in javascript that redirects medium.com to scribe.rip

15:49

Unfortunately, as an AI language model, I don't have the capability to generate and execute a user script on Safari. However, I can provide you with a sample code that you can use to create your own user script.

// ==UserScript==
// @name         Medium to Scribe Redirect
// @version      1
// @description  Redirects medium.com to scribe.rip
// @match        https://medium.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    window.location.href = "https://scribe.rip";
})();

To use this code, follow these steps:

  1. Open Safari and go to the menu bar.
  2. Click on Safari > Preferences.
  3. Go to the Advanced tab and check the box that says "Show Develop menu in menu bar."
  4. Close the Preferences window.
  5. Go to the Develop menu in the menu bar and click on "Show Extension Builder."
  6. Click on the "+" button in the bottom left corner and select "New Extension..."
  7. Enter a name for your extension and select "User Script" as the extension type.
  8. In the left sidebar, click on "Background" and then click on the "New" button in the right sidebar.
  9. Enter a name for your user script and paste the code provided above into the script editor.
  10. Click on the "Run" button in the top right corner to test your user script.
  11. If your user script works as expected, click on the "Install" button in the top right corner to install it as a Safari extension.
15:49
You

Generate a userscript for safari in javascript that redirects editorial-workflows.com to the same path at editorial-app.appspot.com/workflow/

00:18

Here is a sample code for a user script that redirects editorial-workflows.com to the same path at editorial-app.appspot.com/workflow/:

// ==UserScript==
// @name         Editorial Workflows Redirect
// @version      1
// @description  Redirects editorial-workflows.com to editorial-app.appspot.com/workflow/
// @match        https://editorial-workflows.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var oldUrl = window.location.href;
    var newUrl = oldUrl.replace("editorial-workflows.com", "editorial-app.appspot.com/workflow/");
    window.location.href = newUrl;
})();

To use this code, follow these steps:

  1. Open Safari and go to the menu bar.
  2. Click on Safari > Preferences.
  3. Go to the Advanced tab and check the box that says "Show Develop menu in menu bar."
  4. Close the Preferences window.
  5. Go to the Develop menu in the menu bar and click on "Show Extension Builder."
  6. Click on the "+" button in the bottom left corner and select "New Extension..."
  7. Enter a name for your extension and select "User Script" as the extension type.
  8. In the left sidebar, click on "Background" and then click on the "New" button in the right sidebar.
  9. Enter a name for your user script and paste the code provided above into the script editor.
  10. Click on the "Run" button in the top right corner to test your user script.
  11. If your user script works as expected, click on the "Install" button in the top right corner to install it as a Safari extension.
00:18