mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
remove jquery
This commit is contained in:
parent
06ed27011c
commit
b177bf634d
2182
3rdparty/closure-compiler/jquery-1.9.js
vendored
2182
3rdparty/closure-compiler/jquery-1.9.js
vendored
File diff suppressed because it is too large
Load Diff
21
3rdparty/jQuery/MIT-LICENSE.txt
vendored
21
3rdparty/jQuery/MIT-LICENSE.txt
vendored
@ -1,21 +0,0 @@
|
||||
Copyright 2013 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
4
3rdparty/jQuery/jquery-1.9.1.min.js
vendored
4
3rdparty/jQuery/jquery-1.9.1.min.js
vendored
File diff suppressed because one or more lines are too long
@ -253,7 +253,6 @@ add_custom_command(OUTPUT
|
||||
install (TARGETS pdf2htmlEX DESTINATION bin)
|
||||
|
||||
set(PDF2HTMLEX_RESOURCE
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/jQuery/jquery-1.9.1.min.js
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/PDF.js/compatibility.min.js
|
||||
${CMAKE_SOURCE_DIR}/share/base.css
|
||||
${CMAKE_SOURCE_DIR}/share/fancy.css
|
||||
|
@ -9,7 +9,6 @@
|
||||
BASEDIR=$(dirname $0)
|
||||
CLOSURE_COMPILER_DIR="$BASEDIR/../3rdparty/closure-compiler"
|
||||
CLOSURE_COMPILER_JAR="$CLOSURE_COMPILER_DIR/compiler.jar"
|
||||
EXTERNS="$CLOSURE_COMPILER_DIR/jquery-1.9.js"
|
||||
INPUT="$BASEDIR/pdf2htmlEX.js"
|
||||
OUTPUT_FN="pdf2htmlEX.min.js"
|
||||
OUTPUT="$BASEDIR/$OUTPUT_FN"
|
||||
@ -19,7 +18,6 @@ OUTPUT="$BASEDIR/$OUTPUT_FN"
|
||||
--compilation_level ADVANCED_OPTIMIZATIONS \
|
||||
--warning_level VERBOSE \
|
||||
--process_jquery_primitives \
|
||||
--externs "$EXTERNS" \
|
||||
--js "$INPUT" \
|
||||
--js_output_file "$OUTPUT" && \
|
||||
echo 'Done.') || \
|
||||
|
@ -6,11 +6,6 @@
|
||||
* https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE
|
||||
*/
|
||||
|
||||
/*
|
||||
* Dependencies:
|
||||
* jQuery - use it only when necessary
|
||||
*/
|
||||
|
||||
/*
|
||||
* Attention:
|
||||
* This files is to be optimized by closure-compiler,
|
||||
@ -239,9 +234,6 @@
|
||||
* @constructor
|
||||
*/
|
||||
function Viewer(config) {
|
||||
/* do nothing if jQuery is not ready */
|
||||
if(!jQuery) return;
|
||||
|
||||
this.config = clone_and_extend_objs(DEFAULT_CONFIG, config);
|
||||
this.pages_loading = [];
|
||||
this.init_before_loading_content();
|
||||
@ -364,13 +356,19 @@
|
||||
var _ = this;
|
||||
var _idx = idx;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'text'
|
||||
}).done(function(data){
|
||||
// load data
|
||||
{
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.onreadystatechange = function(){
|
||||
if(xhr.readyState != 4) return;
|
||||
// Reset loading token
|
||||
delete _.pages_loading[idx];
|
||||
|
||||
if(xhr.status == 200) {
|
||||
// find the page element in the data
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = data;
|
||||
div.innerHTML = xhr.responseText;
|
||||
|
||||
var new_page = null;
|
||||
var nodes = div.childNodes;
|
||||
@ -398,14 +396,11 @@
|
||||
|
||||
_.schedule_render(false);
|
||||
|
||||
// Reset loading token
|
||||
delete _.pages_loading[idx];
|
||||
|
||||
if(callback){ callback(p); }
|
||||
}).fail(function(jqXHR, textStatus, errorThrown){
|
||||
// Reset loading token
|
||||
delete _.pages_loading[_idx];
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.send(null);
|
||||
}
|
||||
}
|
||||
// Concurrent prefetch of the next pages
|
||||
if (pages_to_preload === undefined)
|
||||
|
Loading…
Reference in New Issue
Block a user