Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7928
bookmarkletcode.js
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:36 PM
2014-11-21 23:36:50 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bookmarkletcode.js
View Options
javascript
:
(
function
()
{
if
(
!
(
document
.
getElementById
(
'wbBlockParentUI'
)))
{
if
(
location
.
href
.
match
(
/^(http):\/\/[A-Za-z]+.(wikipedia.org)/
)
==
null
||
wgNamespaceNumber
!=
0
)
{
alert
(
'Please select a valid article from wikipedia and invoke WikiBhasha (Beta).'
);
return
;
}
this
.
baseUrl
=
'http://www.wikibhasha.org/'
;
this
.
targetLanguageCode
=
'en'
;
this
.
wikiSourceLanguage
=
typeof
wgUserLanguage
!==
'undefined'
?
wgUserLanguage
:
'en'
;
wbBookMarkletLinkDiv
=
document
.
createElement
(
'div'
);
wbBookMarkletLinkDiv
.
id
=
'wbLoadDiv'
;
this
.
wbIsInvokedFromBookmarklet
=
'true'
;
wbBookMarkletLinkDiv
.
innerHTML
=
'<div style="background-color:Black;color:#FFFFFF;position:absolute;text-align:center;font-size:13px;font-weight:bold;left:0px;top:0px;padding:10px 0;z-index:1000;width:100%;border-bottom:3px solid gray;">Loading...</div>'
;
document
.
body
.
appendChild
(
wbBookMarkletLinkDiv
);
function
addScript
(
srcUrl
)
{
wbBookMarkletScripts
=
document
.
createElement
(
'script'
);
wbBookMarkletScripts
.
setAttribute
(
'src'
,
'http://www.wikibhasha.org/'
+
srcUrl
);
document
.
body
.
appendChild
(
wbBookMarkletScripts
);
}
addScript
(
'js/main.js'
);
}
})()
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7456
Default Alt Text
bookmarkletcode.js (1 KB)
Attached To
Mode
T30094: WikiBhasha uses wrong language code for Portuguese (there is no pt-br.wikipedia.org)
Attached
Detach File
Event Timeline
Log In to Comment