{"id":1153,"date":"2022-09-25T13:02:05","date_gmt":"2022-09-25T04:02:05","guid":{"rendered":"https:\/\/mowareblog.net\/3rd\/?p=1153"},"modified":"2022-09-26T01:05:18","modified_gmt":"2022-09-25T16:05:18","slug":"js-chrome%e6%8b%a1%e5%bc%b5%e6%a9%9f%e8%83%bd%e3%82%92%e4%bd%9c%e6%88%90%e5%a4%b1%e6%95%97","status":"publish","type":"post","link":"https:\/\/mowareblog.net\/3rd\/2022\/09\/1153\/js-chrome%e6%8b%a1%e5%bc%b5%e6%a9%9f%e8%83%bd%e3%82%92%e4%bd%9c%e6%88%90%e5%a4%b1%e6%95%97\/","title":{"rendered":"[JavaScript] Chrome\u62e1\u5f35\u6a5f\u80fd\u306e\u4f5c\u6210\u5931\u6557"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u8e0f\u3093\u3067\u3057\u307e\u3063\u305f\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u30ea\u30f3\u30af\u3092Chrome\u306eURL\u3092\u66f8\u304d\u63db\u3048\u3066\u7121\u52b9\u306b\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3088\u3046\u30683\u6642\u9593\u307b\u3069\u683c\u95d8\u3057\u307e\u3057\u305f\u304c\u3001\u7d50\u5c40\u3067\u304d\u305a\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30ad\u30eb\u4e0d\u8db3\u3068\u3044\u3046\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30cd\u30c3\u30c8\u60c5\u5831\u304c\u9673\u8150\u5316\u3057\u3066\u3044\u308b\u306e\u304b\u3001\u3053\u3068\u3054\u3068\u304f\u30c0\u30e1\u3060\u3063\u305f\u306e\u304c\u3068\u3066\u3082\u6b8b\u5ff5\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u5f53\u306b\u3053\u306e\u8a00\u8a9e\u3068\u306f\u3068\u3053\u3068\u3093\u76f8\u6027\u304c\u60aa\u3044\u3067\u3059\u3002\u751f\u304d\u99ac\u306e\u76ee\u3092\u629c\u304f\u5546\u696d\u4e3b\u7fa9\u306e\u4e16\u754c\u3067\u306f\u6280\u8853\u9769\u65b0\u304c\u76ee\u307e\u3050\u308b\u3057\u304f\u3066\u4ed8\u3044\u3066\u3044\u304f\u306e\u3082\u5927\u5909\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30eb\u30fc\u30eb\u3082\u4f55\u3082Google\u306e\u601d\u60d1\u6b21\u7b2c\u3067\u3059\u304b\u3089\u3001\u4f55\u304b\u3057\u3089\u306e\u5927\u304d\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u306a\u3044\u3068\u7a4d\u6975\u7684\u306b\u53d6\u308a\u7d44\u3082\u3046\u3068\u306f\u601d\u308f\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u3082\u305d\u3046\u3067\u3059\u304c\u3001chromedriver\u3092\u5e38\u306b\u6700\u65b0\u306b\u3057\u3066\u3044\u306a\u3044\u3068Python\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u52d5\u304b\u306a\u304f\u306a\u308b\u306e\u3067\u65e5\u3005\u306e\u30e1\u30f3\u30c6\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002Google\u3068\u95a2\u308f\u3063\u3066\u3044\u304f\u306e\u3082\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6271\u3044\u65b9\u306b\u3088\u3063\u3066\u306f\u7267\u6b4c\u7684\u306b\u3082\u306a\u308bC\/C++\u306e\u65b9\u304c\u79c1\u306b\u306f\u5411\u3044\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u3002\u6b21\u306bJavaScript\u3092\u66f8\u304f\u306e\u306f\u3044\u3064\u306b\u306a\u308b\u3053\u3068\u304b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript\u306b\u3064\u3044\u3066\u306f\u6c17\u304c\u5411\u3044\u305f\u3089\u66f8\u3044\u3066\u307f\u308b\u3082\u306e\u306e\u3001\u6e80\u8db3\u306b\u66f8\u3051\u306a\u304f\u3066\u60aa\u614b\u3092\u3064\u3044\u3066\u53bb\u308b\u3001\u306e\u7e70\u308a\u8fd4\u3057\u3067\u3059\u3002\u3053\u308c\u307e\u3067\u5b66\u3093\u3067\u304d\u305fPython\u3001Java\u3001C\/C++\u306a\u3069\u3068\u9055\u3063\u3066\u5168\u7136\u30b9\u30ad\u30eb\u304c\u7a4d\u307f\u4e0a\u304c\u3063\u3066\u3044\u304b\u306a\u3044\u306e\u3067\u3059\u304b\u3089\u56f0\u3063\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u3060\u8a00\u8a9e\u3068\u3057\u3066\u4f53\u7cfb\u7684\u306b\u628a\u63e1\u3067\u304d\u3066\u3044\u306a\u3044\u3067\u3059\u3057\u3001\u305d\u3082\u305d\u3082\u4f53\u7cfb\u7684\u306a\u306e\u304b\u7591\u554f\u3067\u3082\u3042\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u66f8\u3044\u3066\u3044\u3066\u3082\u5730\u306b\u8db3\u304c\u3064\u304b\u306a\u3044\u611f\u3058\u304c\u534a\u7aef\u306a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-js\" data-file=\"\u3000\u691c\u8a0e\u4f8b\" data-lang=\"JavaScript\"><code>chrome.tabs.query({&#39;active&#39;: true, &#39;lastFocusedWindow&#39;: true}, tabs =&gt; {\n    const url = tabs[0].url\n    console.log(&quot;url: %s&quot;, url);\n    \n    if (url.match(\/&tag=\/)) {\n        const urlSplits = url.split(&#39;&tag=&#39;);\n        location.replace(urlSplits[0]);\n        location.reload();\n    }\n})<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-bash\" data-file=\"manifest.json\" data-lang=\"Bash\"><code>{\n  &quot;name&quot;: &quot;No Affiliate&quot;,\n  &quot;description&quot;: &quot;&quot;,\n  &quot;version&quot;: &quot;0.1&quot;,\n  &quot;manifest_version&quot;: 3,\n  &quot;content_scripts&quot;: [\n    {\n        &quot;matches&quot;: [&quot;https:\/\/*\/&quot;],    \n        &quot;js&quot;: [&quot;noAffiliate.js&quot;]\n    }\n  ],\n  &quot;permissions&quot;: [\n    &quot;tabs&quot;\n  ]\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8e0f\u3093\u3067\u3057\u307e\u3063\u305f\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u30ea\u30f3\u30af\u3092Chrome\u306eURL\u3092\u66f8\u304d\u63db\u3048\u3066\u7121\u52b9\u306b\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3088\u3046\u30683\u6642\u9593\u307b\u3069\u683c\u95d8\u3057\u307e\u3057\u305f\u304c\u3001\u7d50\u5c40\u3067\u304d\u305a\u3067\u3057\u305f\u3002 \u30b9\u30ad\u30eb\u4e0d\u8db3\u3068\u3044\u3046\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30cd\u30c3\u30c8\u60c5\u5831\u304c\u9673\u8150\u5316\u3057\u3066\u3044\u308b\u306e\u304b\u3001\u3053\u3068\u3054\u3068 &hellip; <a href=\"https:\/\/mowareblog.net\/3rd\/2022\/09\/1153\/js-chrome%e6%8b%a1%e5%bc%b5%e6%a9%9f%e8%83%bd%e3%82%92%e4%bd%9c%e6%88%90%e5%a4%b1%e6%95%97\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">[JavaScript] Chrome\u62e1\u5f35\u6a5f\u80fd\u306e\u4f5c\u6210\u5931\u6557<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-1153","post","type-post","status-publish","format-standard","hentry","category-14"],"_links":{"self":[{"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/posts\/1153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/comments?post=1153"}],"version-history":[{"count":21,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/posts\/1153\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/posts\/1153\/revisions\/1181"}],"wp:attachment":[{"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/media?parent=1153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/categories?post=1153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mowareblog.net\/3rd\/wp-json\/wp\/v2\/tags?post=1153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}