Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit4b20874

Browse files
authored
Add segment script and update iframe attributes for YouTube video player (coderabbitai#68)
1 parenta39c937 commit4b20874

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

‎docs/introduction.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ performing continuous, incremental reviews for each commit within a pull
2323
request. Review feedback is sent back to the pull requests and can be directly
2424
committed.
2525

26-
<iframewidth="560"height="315"src="https://www.youtube.com/embed/3SyUOSebG7E?si=i0oT9RAnH0PW81lY"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
26+
<iframewidth="560"height="315"src="https://www.youtube.com/embed/3SyUOSebG7E?si=i0oT9RAnH0PW81lY"title="YouTube video player"frameBorder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerPolicy="strict-origin-when-cross-origin"allowFullScreen></iframe>
2727

2828
**CodeRabbit** integrates into code repositories using GitHub or GitLab webhooks
2929
and monitors events related to Pull Request (PR) and Merge Request (MR) changes.

‎docusaurus.config.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ const config: Config = {
118118
"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",
119119
"/docs/js/code-block-buttons.js",
120120
"https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js",
121+
{
122+
src:"/js/segment.js",
123+
async:false,
124+
},
121125
{
122126
src:"https://js.hs-scripts.com/43613284.js",
123127
type:"text/javascript",

‎static/js/segment.js‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
!(function(){
2+
vari="analytics",
3+
analytics=(window[i]=window[i]||[]);
4+
if(!analytics.initialize)
5+
if(analytics.invoked)
6+
window.console&&
7+
console.error&&
8+
console.error("Segment snippet included twice.");
9+
else{
10+
analytics.invoked=!0;
11+
analytics.methods=[
12+
"trackSubmit",
13+
"trackClick",
14+
"trackLink",
15+
"trackForm",
16+
"pageview",
17+
"identify",
18+
"reset",
19+
"group",
20+
"track",
21+
"ready",
22+
"alias",
23+
"debug",
24+
"page",
25+
"screen",
26+
"once",
27+
"off",
28+
"on",
29+
"addSourceMiddleware",
30+
"addIntegrationMiddleware",
31+
"setAnonymousId",
32+
"addDestinationMiddleware",
33+
"register",
34+
];
35+
analytics.factory=function(e){
36+
returnfunction(){
37+
if(window[i].initialized)
38+
returnwindow[i][e].apply(window[i],arguments);
39+
varn=Array.prototype.slice.call(arguments);
40+
if(
41+
["track","screen","alias","group","page","identify"].indexOf(
42+
e
43+
)>-1
44+
){
45+
varc=document.querySelector("link[rel='canonical']");
46+
n.push({
47+
__t:"bpc",
48+
c:(c&&c.getAttribute("href"))||void0,
49+
p:location.pathname,
50+
u:location.href,
51+
s:location.search,
52+
t:document.title,
53+
r:document.referrer,
54+
});
55+
}
56+
n.unshift(e);
57+
analytics.push(n);
58+
returnanalytics;
59+
};
60+
};
61+
for(varn=0;n<analytics.methods.length;n++){
62+
varkey=analytics.methods[n];
63+
analytics[key]=analytics.factory(key);
64+
}
65+
analytics.load=function(key,n){
66+
vart=document.createElement("script");
67+
t.type="text/javascript";
68+
t.async=!0;
69+
t.setAttribute("data-global-segment-analytics-key",i);
70+
t.src=
71+
"https://cdn.segment.com/analytics.js/v1/"+
72+
key+
73+
"/analytics.min.js";
74+
varr=document.getElementsByTagName("script")[0];
75+
r.parentNode.insertBefore(t,r);
76+
analytics._loadOptions=n;
77+
};
78+
analytics._writeKey="IvcQvqtKQS24hYl0lkuvsfFSCpCse4F8";
79+
analytics.SNIPPET_VERSION="5.2.0";
80+
analytics.load("IvcQvqtKQS24hYl0lkuvsfFSCpCse4F8");
81+
analytics.page();
82+
}
83+
})();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp