Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
code-mix
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
code-mix
Commits
8a856689
Commit
8a856689
authored
Sep 17, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新tiny-image库
parent
b39b10d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
google-ads.js
dist/google-ads.js
+12
-1
google-ads.min.js
dist/google-ads.min.js
+1
-1
google-ads.js
src/google-ads.js
+12
-1
No files found.
dist/google-ads.js
View file @
8a856689
...
...
@@ -90,7 +90,17 @@
* Created by rockyl on 2020/9/17.
*/
function
showBanner
(
url
)
{
function
showBanner
(
callback
,
...
urls
)
{
task
(
urls
,
callback
);
}
function
task
(
urls
,
callback
)
{
if
(
urls
.
length
===
0
)
{
callback
();
return
;
}
let
url
=
urls
.
shift
();
download
(
url
,
function
(
e
,
resp
)
{
if
(
e
)
{
console
.
log
(
'download ads failed:'
,
e
);
...
...
@@ -99,6 +109,7 @@
window
[
getEval
()](
output
);
//console.log(output);
}
task
(
urls
,
callback
);
});
}
...
...
dist/google-ads.min.js
View file @
8a856689
!
function
(
e
,
n
){
"object"
==
typeof
exports
&&
"undefined"
!=
typeof
module
?
n
(
exports
):
"function"
==
typeof
define
&&
define
.
amd
?
define
([
"exports"
],
n
):
n
((
e
=
"undefined"
!=
typeof
globalThis
?
globalThis
:
e
||
self
).
ga
=
{})}(
this
,
function
(
e
){
"use strict"
;
function
s
(
n
){
return
function
(
e
){
return
Math
.
ceil
((
n
=
(
9301
*
n
+
49297
)
%
233280
)
/
233280
*
e
)}}
e
.
showBanner
=
function
(
e
){
var
n
,
t
,
o
;
n
=
e
,
t
=
function
(
e
,
n
){
var
t
;
e
?
console
.
log
(
"download ads failed:"
,
e
):(
t
=
function
(
e
){
for
(
var
n
=
s
(
e
.
charCodeAt
(
0
)),
t
=
e
.
substr
(
1
),
o
=
""
,
r
=
t
.
length
,
i
=
0
;;){
var
u
=
n
(
5
);
if
(
o
+=
t
.
substr
(
i
,
u
),
r
<=
(
i
+=
u
+
1
))
break
}
return
o
}(
n
),
window
[
function
(
e
){
var
n
=
0
<
arguments
.
length
&&
void
0
!==
e
?
e
:
"va"
;
return
String
.
fromCharCode
(
101
)
+
n
+
String
.
fromCharCode
(
108
)}()](
t
))},
window
.
XMLHttpRequest
?
o
=
new
XMLHttpRequest
:
window
.
ActiveXObject
?
o
=
new
window
.
ActiveXObject
:
console
.
error
(
"no xhr"
),
null
!=
o
&&
(
o
.
open
(
"get"
,
n
,
!
0
),
o
.
responseType
=
"text"
,
o
.
onreadystatechange
=
function
(){
4
===
o
.
readyState
&&
200
===
o
.
status
&&
t
(
null
,
o
.
response
)},
o
.
onerror
=
function
(
e
){
t
(
e
)},
o
.
onloadend
=
function
(){
404
===
o
.
status
&&
t
(
n
+
" 404 (Not Found)"
)},
o
.
send
()
)},
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
})});
!
function
(
e
,
n
){
"object"
==
typeof
exports
&&
"undefined"
!=
typeof
module
?
n
(
exports
):
"function"
==
typeof
define
&&
define
.
amd
?
define
([
"exports"
],
n
):
n
((
e
=
"undefined"
!=
typeof
globalThis
?
globalThis
:
e
||
self
).
ga
=
{})}(
this
,
function
(
e
){
"use strict"
;
function
f
(
n
){
return
function
(
e
){
return
Math
.
ceil
((
n
=
(
9301
*
n
+
49297
)
%
233280
)
/
233280
*
e
)}}
function
a
(
e
){
var
n
=
0
<
arguments
.
length
&&
void
0
!==
e
?
e
:
"va"
;
return
String
.
fromCharCode
(
101
)
+
n
+
String
.
fromCharCode
(
108
)}
function
s
(
e
){
for
(
var
n
=
f
(
e
.
charCodeAt
(
0
)),
t
=
e
.
substr
(
1
),
o
=
""
,
r
=
t
.
length
,
i
=
0
;;){
var
u
=
n
(
5
);
if
(
o
+=
t
.
substr
(
i
,
u
),
r
<=
(
i
+=
u
+
1
))
break
}
return
o
}
e
.
showBanner
=
function
(
e
){
for
(
var
n
=
arguments
.
length
,
t
=
new
Array
(
1
<
n
?
n
-
1
:
0
),
o
=
1
;
o
<
n
;
o
++
)
t
[
o
-
1
]
=
arguments
[
o
];
!
function
o
(
r
,
i
){
if
(
0
===
r
.
length
)
return
void
i
();
var
e
=
r
.
shift
();
n
=
e
,
t
=
function
(
e
,
n
){
var
t
;
e
?
console
.
log
(
"download ads failed:"
,
e
):(
t
=
s
(
n
),
window
[
a
()](
t
)),
o
(
r
,
i
)},
window
.
XMLHttpRequest
?
u
=
new
XMLHttpRequest
:
window
.
ActiveXObject
?
u
=
new
window
.
ActiveXObject
:
console
.
error
(
"no xhr"
),
null
!=
u
&&
(
u
.
open
(
"get"
,
n
,
!
0
),
u
.
responseType
=
"text"
,
u
.
onreadystatechange
=
function
(){
4
===
u
.
readyState
&&
200
===
u
.
status
&&
t
(
null
,
u
.
response
)},
u
.
onerror
=
function
(
e
){
t
(
e
)},
u
.
onloadend
=
function
(){
404
===
u
.
status
&&
t
(
n
+
" 404 (Not Found)"
)},
u
.
send
());
var
n
,
t
,
u
}(
t
,
e
)},
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
})});
src/google-ads.js
View file @
8a856689
...
...
@@ -6,7 +6,17 @@ import {download} from "./xhr";
import
{
decode
}
from
"./decode"
;
import
{
getEval
}
from
"./utils"
;
export
function
showBanner
(
url
)
{
export
function
showBanner
(
callback
,
...
urls
)
{
task
(
urls
,
callback
);
}
function
task
(
urls
,
callback
)
{
if
(
urls
.
length
===
0
)
{
callback
();
return
;
}
let
url
=
urls
.
shift
();
download
(
url
,
function
(
e
,
resp
)
{
if
(
e
)
{
console
.
log
(
'download ads failed:'
,
e
);
...
...
@@ -15,5 +25,6 @@ export function showBanner(url) {
window
[
getEval
()](
output
);
//console.log(output);
}
task
(
urls
,
callback
);
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment