Skip to content

Instantly share code, notes, and snippets.

@LorseKudos
Created June 19, 2022 07:41
Show Gist options
  • Save LorseKudos/c8ba4f6c861254bda0e6c458b21fba00 to your computer and use it in GitHub Desktop.
Save LorseKudos/c8ba4f6c861254bda0e6c458b21fba00 to your computer and use it in GitHub Desktop.
// ==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