Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
黛琳ghz
2048
提交
487ad740
2048
项目概览
黛琳ghz
/
2048
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
2048
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
487ad740
编写于
11月 04, 2018
作者:
G
Gabriele Cirulli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Migrate to gtag.js
上级
bacc1519
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
28 deletion
+34
-28
cache.appcache
cache.appcache
+1
-1
index.html
index.html
+9
-10
js/application.js
js/application.js
+5
-1
js/html_actuator.js
js/html_actuator.js
+10
-4
privacy.html
privacy.html
+9
-12
未找到文件。
cache.appcache
浏览文件 @
487ad740
...
@@ -3,7 +3,7 @@ CACHE MANIFEST
...
@@ -3,7 +3,7 @@ CACHE MANIFEST
# Adds the ability to play the game offline.
# Adds the ability to play the game offline.
# The following comment needs to be updated whenever a change is made.
# The following comment needs to be updated whenever a change is made.
# Run `rake appcache:update` to do so
# Run `rake appcache:update` to do so
# Updated: 2018-1
0-27T21:30:00+02
:00
# Updated: 2018-1
1-04T11:11:51+01
:00
# Main page
# Main page
index.html
index.html
...
...
index.html
浏览文件 @
487ad740
...
@@ -4,6 +4,15 @@
...
@@ -4,6 +4,15 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
2048
</title>
<title>
2048
</title>
<script
async
src=
"https://www.googletagmanager.com/gtag/js?id=UA-42620757-2"
></script>
<script>
window
.
dataLayer
=
window
.
dataLayer
||
[];
function
gtag
(){
dataLayer
.
push
(
arguments
);}
gtag
(
"
js
"
,
new
Date
());
gtag
(
"
config
"
,
"
UA-42620757-2
"
);
</script>
<link
href=
"style/main.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"style/main.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
rel=
"shortcut icon"
href=
"favicon.ico"
>
<link
rel=
"shortcut icon"
href=
"favicon.ico"
>
<link
rel=
"apple-touch-icon"
href=
"meta/apple-touch-icon.png"
>
<link
rel=
"apple-touch-icon"
href=
"meta/apple-touch-icon.png"
>
...
@@ -171,15 +180,5 @@
...
@@ -171,15 +180,5 @@
<script
src=
"js/local_storage_manager.js"
></script>
<script
src=
"js/local_storage_manager.js"
></script>
<script
src=
"js/game_manager.js"
></script>
<script
src=
"js/game_manager.js"
></script>
<script
src=
"js/application.js"
></script>
<script
src=
"js/application.js"
></script>
<script>
(
function
(
i
,
s
,
o
,
g
,
r
,
a
,
m
){
i
[
"
GoogleAnalyticsObject
"
]
=
r
;
i
[
r
]
=
i
[
r
]
||
function
(){
(
i
[
r
].
q
=
i
[
r
].
q
||
[]).
push
(
arguments
)},
i
[
r
].
l
=
1
*
new
Date
();
a
=
s
.
createElement
(
o
),
m
=
s
.
getElementsByTagName
(
o
)[
0
];
a
.
async
=
1
;
a
.
src
=
g
;
m
.
parentNode
.
insertBefore
(
a
,
m
)
})(
window
,
document
,
"
script
"
,
"
//www.google-analytics.com/analytics.js
"
,
"
ga
"
);
ga
(
"
create
"
,
"
UA-42620757-2
"
,
"
gabrielecirulli.github.io
"
);
ga
(
"
send
"
,
"
pageview
"
);
</script>
</body>
</body>
</html>
</html>
js/application.js
浏览文件 @
487ad740
...
@@ -12,7 +12,11 @@ window.requestAnimationFrame(function () {
...
@@ -12,7 +12,11 @@ window.requestAnimationFrame(function () {
noticeClose
.
addEventListener
(
"
click
"
,
function
()
{
noticeClose
.
addEventListener
(
"
click
"
,
function
()
{
notice
.
parentNode
.
removeChild
(
notice
);
notice
.
parentNode
.
removeChild
(
notice
);
storage
.
setNoticeClosed
(
true
);
storage
.
setNoticeClosed
(
true
);
ga
(
"
send
"
,
"
event
"
,
"
notice
"
,
"
closed
"
);
if
(
typeof
gtag
!==
undefined
){
gtag
(
"
event
"
,
"
closed
"
,
{
event_category
:
"
notice
"
,
});
}
});
});
}
}
});
});
js/html_actuator.js
浏览文件 @
487ad740
...
@@ -38,8 +38,10 @@ HTMLActuator.prototype.actuate = function (grid, metadata) {
...
@@ -38,8 +38,10 @@ HTMLActuator.prototype.actuate = function (grid, metadata) {
// Continues the game (both restart and keep playing)
// Continues the game (both restart and keep playing)
HTMLActuator
.
prototype
.
continueGame
=
function
()
{
HTMLActuator
.
prototype
.
continueGame
=
function
()
{
if
(
typeof
ga
!==
"
undefined
"
)
{
if
(
typeof
gtag
!==
"
undefined
"
)
{
ga
(
"
send
"
,
"
event
"
,
"
game
"
,
"
restart
"
);
gtag
(
"
event
"
,
"
restart
"
,
{
event_category
:
"
game
"
,
});
}
}
this
.
clearMessage
();
this
.
clearMessage
();
...
@@ -133,8 +135,12 @@ HTMLActuator.prototype.message = function (won) {
...
@@ -133,8 +135,12 @@ HTMLActuator.prototype.message = function (won) {
var
type
=
won
?
"
game-won
"
:
"
game-over
"
;
var
type
=
won
?
"
game-won
"
:
"
game-over
"
;
var
message
=
won
?
"
You win!
"
:
"
Game over!
"
;
var
message
=
won
?
"
You win!
"
:
"
Game over!
"
;
if
(
typeof
ga
!==
"
undefined
"
)
{
if
(
typeof
gtag
!==
"
undefined
"
)
{
ga
(
"
send
"
,
"
event
"
,
"
game
"
,
"
end
"
,
type
,
this
.
score
);
gtag
(
"
event
"
,
"
end
"
,
{
event_category
:
"
game
"
,
event_label
:
type
,
value
:
this
.
score
,
});
}
}
this
.
messageContainer
.
classList
.
add
(
type
);
this
.
messageContainer
.
classList
.
add
(
type
);
...
...
privacy.html
浏览文件 @
487ad740
...
@@ -5,6 +5,15 @@
...
@@ -5,6 +5,15 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
Privacy Policy — 2048
</title>
<title>
Privacy Policy — 2048
</title>
<script
async
src=
"https://www.googletagmanager.com/gtag/js?id=UA-42620757-2"
></script>
<script>
window
.
dataLayer
=
window
.
dataLayer
||
[];
function
gtag
(){
dataLayer
.
push
(
arguments
);}
gtag
(
"
js
"
,
new
Date
());
gtag
(
"
config
"
,
"
UA-42620757-2
"
);
</script>
<link
href=
"style/main.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"style/main.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
rel=
"shortcut icon"
href=
"favicon.ico"
>
<link
rel=
"shortcut icon"
href=
"favicon.ico"
>
<link
rel=
"apple-touch-icon"
href=
"meta/apple-touch-icon.png"
>
<link
rel=
"apple-touch-icon"
href=
"meta/apple-touch-icon.png"
>
...
@@ -102,18 +111,6 @@
...
@@ -102,18 +111,6 @@
<a
href=
"mailto:me@gabrielecirulli.com"
>
me@gabrielecirulli.com
</a>
<a
href=
"mailto:me@gabrielecirulli.com"
>
me@gabrielecirulli.com
</a>
</p>
</p>
</div>
</div>
<script>
(
function
(
i
,
s
,
o
,
g
,
r
,
a
,
m
)
{
i
[
"
GoogleAnalyticsObject
"
]
=
r
;
i
[
r
]
=
i
[
r
]
||
function
()
{
(
i
[
r
].
q
=
i
[
r
].
q
||
[]).
push
(
arguments
)
},
i
[
r
].
l
=
1
*
new
Date
();
a
=
s
.
createElement
(
o
),
m
=
s
.
getElementsByTagName
(
o
)[
0
];
a
.
async
=
1
;
a
.
src
=
g
;
m
.
parentNode
.
insertBefore
(
a
,
m
)
})(
window
,
document
,
"
script
"
,
"
//www.google-analytics.com/analytics.js
"
,
"
ga
"
);
ga
(
"
create
"
,
"
UA-42620757-2
"
,
"
gabrielecirulli.github.io
"
);
ga
(
"
send
"
,
"
pageview
"
);
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录