Solve the problem of site progress bar can not be dragged into ~

Author: basket bomber 5th
link: https: //www.jianshu.com/p/db3bf652a0af
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Generally, we look at the video site, you rarely see the situation will not allow drag the progress bar, but it has been more common student party, because you may want to brush public elective, so the general public elective brush such sites are generally free to limit drag moving progress bar.

The general progress of this limitation is due js function caused. So js file to modify it. As the online modification, then a browser refresh, then modify the contents resumed, so we need a plug-in mapping.

Here the author operating environment is Windows, browser with a chrome. See above authors say that before the mac system seems to have problems, might fail, I never used mac system, so it is not broken down on mac Can lower.

First, download the ReRes plug-in, which can be used to map js, which means it can run on other original server js files into js under your local computer, to achieve some of the original is limited to the features you want to achieve.

1. Download ReRes, it can intercept replace js file

Find Chrome plug-in function enables replacement js file called ReRes: https://github.com/annnhan/ReRes

It can be mapped to other request url, you can be mapped to a file or directory of the machine.



2. Locate the site player configuration code
2.1. Simple website, you will find this property directly.

View in Developer Tools site directory, found in the js folder ckplayer.js , which is very detailed comments, and she found a progress bar control function of schedule properties.

As long as this js modify the property value, you should be able to achieve drag the progress bar. Of course, if online changes, then refresh the page once, it will restitution. So it is necessary to download this file js down, and then modify!

2.2 Comparison of complex sites

 

 

 You see this is to compare the above complex site, it does not directly indicate the schedule attribute, so you need to do is download them directly to your local, then open each js file with a software, and global search schedule properties one by one, found, then modified directly.

 

3. Modify the JS file

Modify the schedule properties in accordance with the official description:
schedule: 1, //是否启用进度调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动

But I found still can not drag the progress bar, read the rest of the configuration properties, find the need to modify one:
timeScheduleAdjust: 1, //是否可调节调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动

 

4. Add Mapping
Open ReRes plug-ins, and then click Add Mapping address.
Add Rule Description:
Please address line with http: // at the beginning, in order to address local file: /// beginning, for example [http://cssha.com](http://cssha.com/), orfile:///D:/a.js
The addition is complete, please refresh the page to view the Web page viewing tools, see if there is an error.
At last:
如果不是Windows系统,可能会导致失败,你可以参考下面地址,在你的本机上添加一个小型服务器,用来解决不同系统的兼容性。当然如果你有一台云服务器的话,在服务器中开启相对应的端口,然后把修改的文件添加进去。这个又设涉及另外一个内容了。

Link: https: //www.jianshu.com/p/db3bf652a0af

Guess you like

Origin www.cnblogs.com/hmy-666/p/12340911.html