(mode, animation = true, invert = false)
| 1922 | |
| 1923 | //Begins to show the previous comic |
| 1924 | function showPreviousComic(mode, animation = true, invert = false) |
| 1925 | { |
| 1926 | var content = template.contentRight().children('div'); |
| 1927 | var contentWidth = content.width(); |
| 1928 | var contentHeight = content.height(); |
| 1929 | |
| 1930 | clearTimeout(showComicSkip); |
| 1931 | |
| 1932 | if(mode == 1) |
| 1933 | { |
| 1934 | var transition = _config.readingViewSpeed < _config.readingDelayComicSkip ? _config.readingViewSpeed : _config.readingDelayComicSkip; |
| 1935 | |
| 1936 | if(_config.readingDelayComicSkip != 0) |
| 1937 | { |
| 1938 | if(readingViewIs('scroll')) |
| 1939 | { |
| 1940 | var skip = template.contentRight('.reading-skip-top'); |
| 1941 | |
| 1942 | skip.css({ |
| 1943 | 'transition': transition+'s, background-color 0.2s, box-shadow 0.2s', |
| 1944 | 'transform': 'translate(0px, 116px)', |
| 1945 | 'opacity': 1, |
| 1946 | }); |
| 1947 | |
| 1948 | var scale = ((contentHeight - 132) / contentHeight); |
| 1949 | |
| 1950 | template.contentRight('.reading-body').css({ |
| 1951 | 'transform-origin': 'center '+contentHeight+'px', |
| 1952 | 'transition': 'transform '+((animation) ? transition : 0)+'s, background-color 0.2s, box-shadow 0.2s', |
| 1953 | 'transition-property': 'transform', |
| 1954 | 'transform': 'scale('+scale+')', |
| 1955 | }); |
| 1956 | } |
| 1957 | else |
| 1958 | { |
| 1959 | var skip = template.contentRight('.reading-skip-left'); |
| 1960 | |
| 1961 | skip.css({ |
| 1962 | 'transition': transition+'s, background-color 0.2s, box-shadow 0.2s', |
| 1963 | 'transform': 'translate(116px, 0px)', |
| 1964 | 'opacity': 1, |
| 1965 | }); |
| 1966 | |
| 1967 | var scale = ((contentWidth - 132) / contentWidth); |
| 1968 | |
| 1969 | template.contentRight('.reading-body').css({ |
| 1970 | 'transform-origin': contentWidth+'px center', |
| 1971 | 'transition': 'transform '+((animation) ? transition : 0)+'s, background-color 0.2s, box-shadow 0.2s', |
| 1972 | 'transition-property': 'transform', |
| 1973 | 'transform': 'scale('+scale+')', |
| 1974 | }); |
| 1975 | } |
| 1976 | |
| 1977 | skip.find('circle').css('animation-duration', _config.readingDelayComicSkip+'s').removeClass('a').delay(10).queue(function(next){$(this).addClass('a');next();}); |
| 1978 | } |
| 1979 | |
| 1980 | if(invert) |
| 1981 | showComicSkip = setTimeout('reading.progress.save(); reading.setFromSkip(); dom.openComic(true, "'+escapeQuotes(escapeBackSlash(dom.nextComic()), 'doubles')+'", "'+escapeQuotes(escapeBackSlash(dom.history.mainPath), 'doubles')+'", false, false, true);', _config.readingDelayComicSkip * 1000); |
no test coverage detected