MCPcopy Index your code
hub / github.com/hoothin/UserScripts / genFx

Function genFx

FlashViewer-HTML5 Video/flashViewer.user.js:1068–1086  ·  view source on GitHub ↗
(type, opts)

Source from the content-addressed store, hash-verified

1066
1067 // 生成show,hide,toggle动画属性
1068 function genFx(type, opts) {
1069 var pros = {
1070 o: ['opacity',],
1071 h: ['width', 'paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth', 'marginLeft', 'marginRight',],
1072 v: ['height', 'paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth', 'marginTop', 'marginBottom',],
1073 };
1074
1075 var ret = {};
1076 for (var i in pros) {
1077 if (!pros.hasOwnProperty(i)) continue;
1078 if (opts[i]) {
1079 pros[i].forEach(function (pro) {
1080 ret[pro] = type;
1081 });
1082 };
1083 };
1084
1085 return ret;
1086 };
1087
1088 // 绘制动画
1089 function draw() {

Callers 1

contentScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected