Okjike Mobile to Web Redirector

Redirect from mobile okjike page to web version

  1. // ==UserScript==
  2. // @name Okjike Mobile to Web Redirector
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Redirect from mobile okjike page to web version
  6. // @author You
  7. // @match https://m.okjike.com/originalPosts/*
  8. // @grant none
  9. // @run-at document-start
  10. // @licence MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Wait until the URL is available
  17. var checkUrl = setInterval(function() {
  18. if (window.location.href) {
  19. clearInterval(checkUrl);
  20. var oldUrl = window.location.href;
  21. var postId = oldUrl.split('/')[4]; // Extracts the post ID
  22. var newUrl = "https://web.okjike.com/originalPost/" + postId;
  23. window.location.replace(newUrl); // Redirects to the web version
  24. }
  25. }, 10); // Check every 10ms
  26. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址