Guest User

Untitled

a guest
Jul 6th, 2025
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. // ==UserScript==
  2. // @name 就活サイト ログインボタン表示
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description axol.jp, i-webs.jp, snar.jp でログインページへのボタンをページ上部に表示
  6. // @match *://job.axol.jp/*
  7. // @match *://job.i-webs.jp/*
  8. // @match *://job.snar.jp/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. function getLoginURL() {
  16. const url = location.href;
  17.  
  18. // axol.jp
  19. if (url.includes("axol.jp")) {
  20. const match = url.match(/job\.axol\.jp\/([a-z0-9_\-/]+)/i);
  21. if (match) {
  22. const path = match[1].split('/').slice(0, 3).join('/');
  23. return "https://job.axol.jp/" + path + "/mypage/login";
  24. }
  25. }
  26.  
  27. // i-webs.jp
  28. if (url.includes("i-webs.jp")) {
  29. const match = url.match(/job\.i-webs\.jp\/([a-z0-9_-]+)/i);
  30. if (match) {
  31. return "https://job.i-webs.jp/" + match[1] + "/mypage/";
  32. }
  33. }
  34.  
  35. // snar.jp
  36. if (url.includes("snar.jp")) {
  37. const match = url.match(/job\.snar\.jp\/([a-z0-9]+)/i);
  38. if (match) {
  39. return "https://job.snar.jp/" + match[1] + "/mypage/login";
  40. }
  41. }
  42.  
  43. return null;
  44. }
  45.  
  46. const loginURL = getLoginURL();
  47. if (!loginURL) return;
  48.  
  49. // ボタン作成
  50. const btn = document.createElement('a');
  51. btn.href = loginURL;
  52. btn.textContent = '🔐 ログインページへ';
  53. btn.style.cssText = `
  54. position: fixed;
  55. top: 10px;
  56. right: 10px;
  57. background: #4a90e2;
  58. color: white;
  59. padding: 8px 12px;
  60. border-radius: 6px;
  61. font-weight: bold;
  62. font-family: sans-serif;
  63. text-decoration: none;
  64. z-index: 9999;
  65. box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  66. `;
  67.  
  68. document.body.appendChild(btn);
  69. })();
Advertisement
Add Comment
Please, Sign In to add comment