Last active
September 26, 2022 08:26
-
-
Save GitHub30/19b999ba29a1d9f52246747a8ba64ed1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide on Job Draft | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://job-draft.jp/users/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=job-draft.jp | |
// @grant none | |
// ==/UserScript== | |
function $x() { | |
var x=''; | |
var node=document; | |
var type=0; | |
var fix=true; | |
var i=0; | |
var cur; | |
function toArray(xp) { | |
var final=[], next; | |
while (next=xp.iterateNext()) { | |
final.push(next); | |
} | |
return final; | |
} | |
while (cur=arguments[i++]) { | |
switch (typeof cur) { | |
case "string": x+=(x=='') ? cur : " | " + cur; continue; | |
case "number": type=cur; continue; | |
case "object": node=cur; continue; | |
case "boolean": fix=cur; continue; | |
} | |
} | |
if (fix) { | |
if (type==6) type=4; | |
if (type==7) type=5; | |
} | |
// selection mistake helper | |
if (!/^\//.test(x)) x="//"+x; | |
// context mistake helper | |
if (node!=document && !/^\./.test(x)) x="."+x; | |
var result=document.evaluate(x, node, null, type, null); | |
if (fix) { | |
// automatically return special type | |
switch (type) { | |
case 1: return result.numberValue; | |
case 2: return result.stringValue; | |
case 3: return result.booleanValue; | |
case 8: | |
case 9: return result.singleNodeValue; | |
} | |
} | |
return fix ? toArray(result) : result; | |
} | |
$x('//div[div[h2[contains(text(), "指名")]]]').forEach(e=>e.hidden = true) | |
$x('//div[div[h2[text()="自己推薦一覧"]]]').forEach(e=>e.hidden = true) | |
$x('//div[div[h2[text()="あなたを気にしている企業"]]]').forEach(e=>e.hidden = true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment