Created
June 19, 2022 07:41
-
-
Save LorseKudos/c8ba4f6c861254bda0e6c458b21fba00 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 AddYahooShoppingCartNotify | |
// @namespace https://github.com/LorseKudos | |
// @version 0.1 | |
// @description ヤフーショッピングのカートページに注意書きを追加します | |
// @author Lorse | |
// @match https://order.shopping.yahoo.co.jp/* | |
// @grant none | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let notify_header = $("<div/>"); | |
let notify_text = $("<a/>"); | |
notify_text.text("ハピタス経由で注文するように!") | |
.attr("href", "https://hapitas.jp/item/detail/itemid/2653/") | |
notify_header.append(notify_text).css({ | |
"font-size": "x-large", | |
"background-color": "#fff3cd", | |
"text-align": "center", | |
"position": "fixed", | |
"top": 0, | |
"left": 0, | |
"width": "100%", | |
"z-index": 500, | |
}); | |
$("body").prepend(notify_header).css({ | |
"padding": "50px" | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment