去哪儿弹窗改通知(商家版)

去哪儿商家后台,警告弹窗改通知形式

// ==UserScript==
// @name         去哪儿弹窗改通知(商家版)
// @namespace    https://github.com/woolition/greasyforks
// @@updateURL   https://github.com/woolition/greasyforks/raw/master/qunar/alert2Notification/alert2Notification.user.js
// @version      0.4
// @description  去哪儿商家后台,警告弹窗改通知形式
// @author       黄盐
// @match        https://tb2cadmin.qunar.com/supplier/product/teamPricePackage.qunar?*Id=*
// @run-at       document-end
// @grant        GM_notification
// @grant        unsafeWindow
// ==/UserScript==

(function() {
  'use strict';
  const checked = 'data:image/gif;base64,R0lGODlhRgBGAPdVAKbXqGC4Y0yvUKXXp1OyV3HAdHnDfGq8beHy4v///1WzWeLy4l63Yuv27ILHhbLdtKfYqXjDfMvozO/48Gy9b9Ts1ZDOk5zTnrXetmO5Ztnu2uv26/3+/XrDfWK5ZojKirrgvJ7UoMPkxYbJicLkxKnYq6PWpU2vUef052O5Z83pztLr022+cfH58ff896HVpKzarpHOlMfmyHC/c9Dq0bXet5bQmOn16fT69XG/dFa0WrjfupXQmHrEfd3w3ojKi7rgu1i0XN7w31q1XsLkw8/q0H/Ggub054fJisfmyavZrez27Gi8bM/p0I3Mj2+/c/P687Hcs5PPltXs1lKyVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP9QoAAAdgAAAAAAAAAAAgAAAAAAAAAAAAAAAHKoAAAIAAAAAAmMyAAOCGQAAAAAAAC0mQAAdwgAAAAZ9hn12AAAAAAAAAAAAGvJ3RvtmlB2SwAZ9kscCwC3dgAAAAAAAAAAABw0wGB2SwAAAAAAAAAAAAUAAAAAABAAgAyQwIAAAAAAAAAAAAADAAAAAAAAAEoASJHAAAAICQAAAAAAAJHAAAAICQAAAA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TNbeyh2IdCF4hYxX8CYGoNgjKkwXryUMWMqDYM0ps6Q0fJBjak2IGTDVDXMtdINU+GQA0I54DDVDSvpgBULCrHQlVM6pLSDYowt5NhUOwQ1lVENIeXUUifd5FNzD5ngkwBAASfjjDTWaOONOOao44489ujjj0AGKeSQRMYUEAA7";
  unsafeWindow.alert = function(message){
    GM_notification({
      title: location.host,
      text: message,
      image: message.indexOf("成功")>-1 ? checked : cross,
      timeout: 2000
    })
  }

})();