Skip to content

Instantly share code, notes, and snippets.

View x3388638's full-sized avatar
:octocat:

YY Chang x3388638

:octocat:
View GitHub Profile
@x3388638
x3388638 / HistoryLogger.user.js
Created January 21, 2021 08:16
Log all pushState and replaceState events in console
// ==UserScript==
// @name HistoryLogger
// @namespace 2yc.tw
// @version 0.1
// @description Log all pushState and replaceState events in console
// @author YY
// @match *://*/*
// @grant none
// ==/UserScript==
{
"success": "1"
}
@x3388638
x3388638 / a.js
Last active August 1, 2019 16:14
var Main = Main || function (u, a) {
function r() {
a(".load", c).removeClass("load");
a("#hidden-pic", c).remove();
c.removeClass("hidden");
TweenLite.to(e, .5, {
css: {
autoAlpha: 0
},
delay: .3,
var YMedia = YUI();
YUI().use('node-base', function(Y) {
Y.Global.publish('ymediaReady', {
fireOnce: true
});
Y.Global.fire('ymediaReady', {
e: YMedia
});
});
YUI.Env.core.push.apply(YUI.Env.core, ["loader-ape-af", "loader-ape-applet", "loader-dust-helpers", "loader-mjata", "loader-stencil", "loader-td-applet-mega-header"]);
YUI.add("loader-ape-af", function(e, a) {
YUI.Env[e.version].modules = YUI.Env[e.version].modules || {}, e.mix(YUI.Env[e.version].modules, {
"af-beacon": {
group: "ape-af",
requires: ["json-stringify", "querystring-stringify-simple", "io-base"]
},
"af-bootstrap": {
group: "ape-af",
requires: ["af-utils"]
(function() {
var a = window.Af = window.Af || {};
var c = a.config = a.config || {};
c.spaceid = 'SPACEID';
c.transport = {
xhr: '/_td_api',
timeout: 3000
};
c.beacon = {
pathPrefix: '/_td_api/beacon',
YUI().use('node-base', function(Y) {
Y.Global.on('ymediaReady', function(data) {
YMedia = data.e;
YMedia.applyConfig({
"groups": {
"td-applet-mega-header": {
"base": "https://s.yimg.com/os/mit/td/td-applet-mega-header-1.0.888/",
"root": "os/mit/td/td-applet-mega-header-1.0.888/",
"combine": false,
"filter": "min",
(function(root) {
root.YUI_config = root.YUI_config || {};
root.YUI_config.lang = 'en-GB';
}(this));
var YMedia = YUI({
bootstrap: true,
lang: 'en-GB',
comboBase: 'https://s.yimg.com/zz/combo?',
YUI.Env.core.push.apply(YUI.Env.core, ["loader-angus", "loader-ape-af", "loader-ape-applet", "loader-ape-location", "loader-ape-pipe", "loader-ape-social", "loader-applet-server", "loader-assembler", "loader-dust-helpers", "loader-finance-streamer", "loader-highlander-client", "loader-live-event-data", "loader-mjata", "loader-stencil", "loader-td-api", "loader-td-dev-info", "loader-td-lib-entertainment", "loader-td-lib-livevideo", "loader-td-lib-social", "loader-td-applet-stream-atomic", "loader-td-applet-mega-header", "loader-td-applet-viewer", "loader-td-applet-navlinks-atomic", "loader-td-applet-trending-atomic", "loader-td-applet-fp-utils", "loader-td-applet-fantasy-promo", "loader-td-applet-sidekick", "loader-td-applet-related-content", "loader-td-applet-weather-atomic", "loader-td-applet-canvass", "loader-td-applet-amplify-hpset", "loader-td-applet-scores-atomic"]);
YUI.add("loader-ape-af", function(e, a) {
YUI.Env[e.version].modules = YUI.Env[e.version].modules || {}, e.mix(YUI.Env[e.version].modules,
(function(){Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var s,i;if(null==this)throw new TypeError(" this is null or not defined");var a=Object(this),n=a.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(s=t),i=0;n>i;){var o;i in a&&(o=a[i],e.call(s,o,i,a)),i++}}),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),s=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var i=[],a=arguments.length>=2?arguments[1]:void 0,n=0;s>n;n++)if(n in t){var o=t[n];e.call(a,o,n,t)&&i.push(o)}return i}),Array.prototype.map||(Array.prototype.map=function(e,t){var s,i,a;if(null==this)throw new TypeError(" this is null or not defined");var n=Object(this),o=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(s=t),i=new Array(o),a=0;o>a;){var r,c;a in n&&(r=n[a],c=e.call(s,r,a,n),i[a]=c),a++}return i}),Stri