mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
started making pdf viewer conditional - work in progress
This commit is contained in:
parent
57f4177f30
commit
57b09e1d60
4 changed files with 10 additions and 6 deletions
4
services/web/.gitignore
vendored
4
services/web/.gitignore
vendored
|
@ -46,10 +46,10 @@ TpdsWorker.js
|
|||
BackgroundJobsWorker.js
|
||||
|
||||
public/js/history/versiondetail.js
|
||||
!public/js/libs/*
|
||||
!public/js/libs/
|
||||
public/js/*
|
||||
!public/js/ace/*
|
||||
!public/js/libs/*
|
||||
!public/js/libs/
|
||||
public/js/editor.js
|
||||
public/js/home.js
|
||||
public/js/forms.js
|
||||
|
|
|
@ -35,7 +35,9 @@ UserSchema = new Schema
|
|||
compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout }
|
||||
compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup }
|
||||
}
|
||||
featureSwitches : {}
|
||||
featureSwitches : {
|
||||
pdfng: { type: Boolean }
|
||||
}
|
||||
referal_id : {type:String, default:() -> uuid.v4().split("-")[0]}
|
||||
refered_users: [ type:ObjectId, ref:'User' ]
|
||||
refered_user_count: { type:Number, default: 0 }
|
||||
|
|
|
@ -112,8 +112,10 @@ block content
|
|||
|
||||
- locals.suppressDefaultJs = true
|
||||
|
||||
- var fingerprintedPath = fingerprint(jsPath+'libs/pdf.worker.js')
|
||||
- var pdfJsWorkerPath = jsPath+'libs/pdf.worker.js?fingerprint='+fingerprintedPath
|
||||
- var pdfPath = 'libs/pdf.worker.js'
|
||||
- if (user.featureSwitches && user.featureSwitches.pdfng) { pdfPath = 'libs/pdfjs-1.0.712/pdf.worker.js'; }
|
||||
- var fingerprintedPath = fingerprint(jsPath+pdfPath)
|
||||
- var pdfJsWorkerPath = jsPath+pdfPath+'?fingerprint='+fingerprintedPath
|
||||
script(type='text/javascript').
|
||||
window.pdfJsWorkerPath = "#{pdfJsWorkerPath}";
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ define [
|
|||
"ide/pdfng/directives/pdfRenderer"
|
||||
"ide/pdfng/directives/pdfPage"
|
||||
"ide/pdfng/directives/pdfViewer"
|
||||
"libs/pdf"
|
||||
"libs/pdfjs-1.0.712/pdf"
|
||||
"text!libs/pdfListView/TextLayer.css"
|
||||
"text!libs/pdfListView/AnnotationsLayer.css"
|
||||
"text!libs/pdfListView/HighlightsLayer.css"
|
||||
|
|
Loading…
Reference in a new issue