File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed
Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1+
2+ var brapi = ( typeof chrome != 'undefined' ) ? chrome : ( typeof browser != 'undefined' ? browser : { } ) ;
3+
4+ ( function ( ) {
5+ var link = document . createElement ( 'link' ) ;
6+ link . id = "_docs_force_html_by_ext" ;
7+ document . documentElement . appendChild ( link ) ;
8+
9+ var script = document . createElement ( 'script' ) ;
10+ script . type = 'text/javascript' ;
11+ script . src = brapi . runtime . getURL ( 'js/page/google-doc-force-html.js' ) ;
12+ document . documentElement . appendChild ( script ) ;
13+ } ) ( )
Original file line number Diff line number Diff line change 1+
2+ if ( ! location . href . includes ( "mode=html" ) ) {
3+ if ( location . href . includes ( "?" ) ) location . href = location . href . replace ( "?" , "?mode=html&" ) ;
4+ else if ( location . href . includes ( "#" ) ) location . href = location . href . replace ( "#" , "?mode=html#" ) ;
5+ else location . href += "?mode=html" ;
6+ }
7+
8+ if ( ! window . _docs_force_html_by_ext ) window . _docs_force_html_by_ext = true
9+ forceHtmlRenderingMode ( 100 )
10+
11+ function forceHtmlRenderingMode ( n ) {
12+ if ( window . _docs_flag_initialData ) window . _docs_flag_initialData [ 'kix-awcp' ] = true ;
13+ else if ( n > 0 ) setTimeout ( forceHtmlRenderingMode . bind ( null , n - 1 ) , 0 ) ;
14+ else console . warn ( "Could not set kix-awcp flag" ) ;
15+ }
Original file line number Diff line number Diff line change 44 "name" : " __MSG_extension_name__" ,
55 "short_name" : " __MSG_extension_short_name__" ,
66 "description" : " __MSG_extension_description__" ,
7- "version" : " 1.53.1 " ,
7+ "version" : " 1.54.0 " ,
88 "default_locale" : " en" ,
99
1010 "browser_action" : {
6363 "page" : " options.html" ,
6464 "chrome_style" : false
6565 },
66+ "content_scripts" : [
67+ {
68+ "matches" : [" https://docs.google.com/document/d/*" ],
69+ "js" : [" js/content/google-doc-force-html.js" ],
70+ "run_at" : " document_start"
71+ }
72+ ],
6673 "commands" : {
6774 "play" : {
6875 "suggested_key" : {"default" : " Alt+P" },
You can’t perform that action at this time.
0 commit comments