Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 就活サイト ログインボタン表示
- // @namespace http://tampermonkey.net/
- // @version 1.0
- // @description axol.jp, i-webs.jp, snar.jp でログインページへのボタンをページ上部に表示
- // @match *://job.axol.jp/*
- // @match *://job.i-webs.jp/*
- // @match *://job.snar.jp/*
- // @grant none
- // ==/UserScript==
- (function () {
- 'use strict';
- function getLoginURL() {
- const url = location.href;
- // axol.jp
- if (url.includes("axol.jp")) {
- const match = url.match(/job\.axol\.jp\/([a-z0-9_\-/]+)/i);
- if (match) {
- const path = match[1].split('/').slice(0, 3).join('/');
- return "https://job.axol.jp/" + path + "/mypage/login";
- }
- }
- // i-webs.jp
- if (url.includes("i-webs.jp")) {
- const match = url.match(/job\.i-webs\.jp\/([a-z0-9_-]+)/i);
- if (match) {
- return "https://job.i-webs.jp/" + match[1] + "/mypage/";
- }
- }
- // snar.jp
- if (url.includes("snar.jp")) {
- const match = url.match(/job\.snar\.jp\/([a-z0-9]+)/i);
- if (match) {
- return "https://job.snar.jp/" + match[1] + "/mypage/login";
- }
- }
- return null;
- }
- const loginURL = getLoginURL();
- if (!loginURL) return;
- // ボタン作成
- const btn = document.createElement('a');
- btn.href = loginURL;
- btn.textContent = '🔐 ログインページへ';
- btn.style.cssText = `
- position: fixed;
- top: 10px;
- right: 10px;
- background: #4a90e2;
- color: white;
- padding: 8px 12px;
- border-radius: 6px;
- font-weight: bold;
- font-family: sans-serif;
- text-decoration: none;
- z-index: 9999;
- box-shadow: 0 2px 6px rgba(0,0,0,0.2);
- `;
- document.body.appendChild(btn);
- })();
Advertisement
Add Comment
Please, Sign In to add comment