2020-12-15 00:26:19 +01:00
|
|
|
<template>
|
2022-03-20 20:43:49 +01:00
|
|
|
<div class="uw-hover uv-hover-trigger-region uw-clickable">
|
2020-12-15 00:26:19 +01:00
|
|
|
TEST CONTENT
|
2020-12-17 01:49:28 +01:00
|
|
|
</div>
|
2022-03-20 20:43:49 +01:00
|
|
|
<div class="popup-panel flex flex-column uw-clickable">
|
2021-10-22 00:30:56 +02:00
|
|
|
<div>
|
|
|
|
<div class="popup-title">Ultrawidify <small>{{settings?.active?.version}} - {{BrowserDetect.processEnvChannel}}</small></div>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div class="site-support-info">
|
|
|
|
<div class="site-support-site">{{site}}</div>
|
|
|
|
<div v-if="siteSupportLevel === 'official'" class="site-support official">
|
2022-01-29 16:23:40 +01:00
|
|
|
<mdicon name="check-decagram" />
|
2021-11-21 02:08:53 +01:00
|
|
|
<div>Official</div>
|
|
|
|
<div class="tooltip">The extension is being tested and should work on this site.</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
</div>
|
|
|
|
<div v-if="siteSupportLevel === 'community'" class="site-support community">
|
|
|
|
<mdicon name="handshake" />
|
2021-11-21 02:08:53 +01:00
|
|
|
<div>Community</div>
|
|
|
|
<div class="tooltip">
|
|
|
|
People say extension works on this site (or have provided help getting the extension to work if it didn't).<br/><br/>
|
|
|
|
Tamius (the dev) does not test the extension on this site, probably because it requires a subscription or
|
|
|
|
is geoblocked.
|
|
|
|
</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
</div>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div v-if="siteSupportLevel === 'no-support'" class="site-support no-support">
|
2021-10-22 00:30:56 +02:00
|
|
|
<mdicon name="help-circle-outline" />
|
2022-01-29 16:23:40 +01:00
|
|
|
<span class="mdi help-circle-outline mdi-help-circle-outline"></span>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div>Unknown</div>
|
|
|
|
<div class="tooltip">
|
|
|
|
Not officially supported. Extension will try to fix things, but no promises.<br/><br/>
|
|
|
|
Tamius (the dev) does not test the extension on this site for various reasons
|
|
|
|
(unaware, not using the site, language barrier, geoblocking, requires paid subscription).
|
|
|
|
</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
</div>
|
|
|
|
<div v-if="siteSupportLevel === 'user-added'" class="site-support user-added">
|
2022-01-29 16:23:40 +01:00
|
|
|
<!-- <mdicon name="account" /> -->
|
|
|
|
<span class="mdi account-edit mdi-account-edit"></span>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div>Custom</div>
|
|
|
|
<div class="tooltip">
|
|
|
|
You have manually changed settings for this site. The extension is doing what you told it to do.
|
|
|
|
</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
</div>
|
|
|
|
<mdicon v-if="siteSupportLevel === 'community'" class="site-support supported" name="checkbox-marked-circle" />
|
2021-10-19 22:49:56 +02:00
|
|
|
</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
</div>
|
|
|
|
<div class="flex flex-row">
|
|
|
|
<div class="tab-row flex flex-column">
|
2021-11-21 02:08:53 +01:00
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="selectTab('videoSettings')"
|
|
|
|
>
|
2021-10-22 00:30:56 +02:00
|
|
|
<mdicon name="crop" />
|
2022-01-29 16:23:40 +01:00
|
|
|
<span class="mdi account-edit mdi-account-edit"></span>
|
2021-10-22 00:30:56 +02:00
|
|
|
Video options
|
|
|
|
</div>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="selectTab('playerDetection')"
|
|
|
|
>
|
|
|
|
Player detection
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="selectTab('autodetectionSettings')"
|
|
|
|
>
|
2021-10-22 00:30:56 +02:00
|
|
|
Autodetection options
|
|
|
|
</div>
|
2021-11-21 02:08:53 +01:00
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="selectTab('advancedOptions')"
|
|
|
|
>
|
2021-10-22 00:30:56 +02:00
|
|
|
<mdicon name="cogs" />
|
2022-01-29 16:23:40 +01:00
|
|
|
<span class="mdi account-edit mdi-cogs"></span>
|
2021-10-22 00:30:56 +02:00
|
|
|
Advanced options
|
|
|
|
</div>
|
|
|
|
<div class="tab">
|
|
|
|
<mdicon name="bug-outline" />
|
2022-01-29 16:23:40 +01:00
|
|
|
<span class="mdi mdi-bug-outline"></span>
|
2021-10-22 00:30:56 +02:00
|
|
|
Debugging
|
|
|
|
</div>
|
2021-10-19 22:49:56 +02:00
|
|
|
</div>
|
2021-10-22 00:30:56 +02:00
|
|
|
<div class="content flex flex-column">
|
|
|
|
<!-- autodetection warning -->
|
|
|
|
|
2021-11-13 00:51:59 +01:00
|
|
|
<div v-if="ultrawidify?.videoData?.hasDrm" class="warning-area">
|
2021-10-22 00:30:56 +02:00
|
|
|
<div class="warning-box">
|
|
|
|
<div>
|
|
|
|
<mdicon name="alert" :size="42" />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
This site uses <a href="https://en.wikipedia.org/wiki/Digital_rights_management" target="_blank">digital rights management</a> solutions that prevent this
|
|
|
|
extension from automatically detecting aspect ratio. You will have to adjust aspect ratio manually.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-row">
|
|
|
|
<!-- Panel section -->
|
|
|
|
<template v-if="settingsInitialized">
|
|
|
|
<VideoSettings
|
|
|
|
:settings="settings"
|
|
|
|
></VideoSettings>
|
|
|
|
<!-- <ResizerDebugPanel :debugData="debugData">
|
|
|
|
</ResizerDebugPanel> -->
|
|
|
|
</template>
|
|
|
|
</div>
|
2021-10-19 22:49:56 +02:00
|
|
|
</div>
|
2021-01-21 00:21:15 +01:00
|
|
|
</div>
|
2020-12-15 00:26:19 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-01-07 00:50:58 +01:00
|
|
|
import VideoSettings from './src/PlayerUiPanels/VideoSettings.vue'
|
2020-12-15 00:26:19 +01:00
|
|
|
import { mapState } from 'vuex';
|
2021-10-22 00:30:36 +02:00
|
|
|
// import Icon from '../common/components/Icon';
|
2022-01-07 00:50:58 +01:00
|
|
|
import ResizerDebugPanel from './src/PlayerUiPanels/ResizerDebugPanelComponent';
|
2021-01-21 00:21:15 +01:00
|
|
|
import BrowserDetect from '../ext/conf/BrowserDetect';
|
2022-01-07 00:50:58 +01:00
|
|
|
import ExecAction from './src/ui-libs/ExecAction';
|
2021-01-21 00:21:15 +01:00
|
|
|
import Logger from '../ext/lib/Logger';
|
|
|
|
import Settings from '../ext/lib/Settings';
|
2020-12-15 00:26:19 +01:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2021-10-22 00:30:36 +02:00
|
|
|
// Icon,
|
2021-01-21 00:21:15 +01:00
|
|
|
ResizerDebugPanel, VideoSettings
|
2020-12-15 00:26:19 +01:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-01-21 00:21:15 +01:00
|
|
|
// component properties
|
|
|
|
settings: {},
|
2021-10-22 00:30:56 +02:00
|
|
|
BrowserDetect: BrowserDetect,
|
2021-01-21 00:21:15 +01:00
|
|
|
settingsInitialized: false,
|
|
|
|
execAction: new ExecAction(),
|
|
|
|
logger: null,
|
|
|
|
|
2022-03-20 20:44:50 +01:00
|
|
|
// we _should_ be always running from an iframe in order to
|
|
|
|
// avoid fucking up CSS. This means rules of the game change
|
|
|
|
// a wee tiny bit.
|
|
|
|
site: window.parent.location.hostname,
|
|
|
|
lastProbeTs: null,
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2020-12-16 00:19:02 +01:00
|
|
|
uiVisible: true,
|
|
|
|
debugData: {
|
|
|
|
resizer: {},
|
|
|
|
player: {},
|
2020-12-16 01:40:09 +01:00
|
|
|
},
|
|
|
|
debugDataPrettified: ''
|
2020-12-15 00:26:19 +01:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
2022-01-07 00:50:58 +01:00
|
|
|
// we don't have vuex here at the moment, so no mapState yet!
|
|
|
|
// ...mapState([
|
|
|
|
// 'showUi',
|
|
|
|
// 'resizerDebugData',
|
|
|
|
// 'playerDebugData'
|
|
|
|
// ]),
|
2021-11-21 02:08:53 +01:00
|
|
|
// LPT: NO ARROW FUNCTIONS IN COMPUTED,
|
|
|
|
// IS SUPER HARAM
|
|
|
|
// THINGS WILL NOT WORK IF YOU USE ARROWS
|
|
|
|
windowWidth() {
|
2020-12-16 01:40:09 +01:00
|
|
|
return window.innerWidth;
|
|
|
|
},
|
2021-11-21 02:08:53 +01:00
|
|
|
windowHeight() {
|
2020-12-16 01:40:09 +01:00
|
|
|
return window.innerHeight;
|
|
|
|
},
|
2021-11-21 02:08:53 +01:00
|
|
|
siteSupportLevel() {
|
|
|
|
console.warn('\n\n\n\n\n\n\n\n\n\n\nsite support level. site:', this, this?.site, this?.settings, this?.settings?.active?.sites[this.site]);
|
|
|
|
return (this.site && this.settings?.active) ? this.settings.active.sites[this.site]?.type || 'no-support' : 'waiting';
|
|
|
|
}
|
2020-12-15 00:26:19 +01:00
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
showUi(visible) {
|
|
|
|
if (visible !== undefined) {
|
|
|
|
this.uiVisible = visible;
|
|
|
|
}
|
2020-12-16 00:19:02 +01:00
|
|
|
},
|
|
|
|
resizerDebugData(newData) {
|
|
|
|
this.debugData.resizer = newData;
|
2020-12-16 01:40:09 +01:00
|
|
|
this.debugDataPrettified = JSON.stringify(this.debugData, null, 2);
|
2020-12-16 00:19:02 +01:00
|
|
|
},
|
|
|
|
playerDebugData(newData) {
|
|
|
|
this.debugData.player = newData;
|
2020-12-16 01:40:09 +01:00
|
|
|
this.debugDataPrettified = JSON.stringify(this.debugData, null, 2);
|
2020-12-15 00:26:19 +01:00
|
|
|
}
|
|
|
|
},
|
2022-03-20 20:43:49 +01:00
|
|
|
|
2021-01-21 00:21:15 +01:00
|
|
|
async created() {
|
|
|
|
try {
|
|
|
|
this.logger = new Logger();
|
|
|
|
await this.logger.init({
|
|
|
|
allowLogging: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
this.settings = new Settings({afterSettingsSaved: this.updateConfig, logger: this.logger});
|
|
|
|
await this.settings.init();
|
|
|
|
this.settingsInitialized = true;
|
|
|
|
|
2021-01-27 00:41:42 +01:00
|
|
|
console.log("settings inited")
|
2021-01-21 00:21:15 +01:00
|
|
|
} catch (e) {
|
|
|
|
console.error('Failed to initiate ultrawidify player ui.', e);
|
|
|
|
}
|
2020-12-15 00:26:19 +01:00
|
|
|
},
|
|
|
|
methods: {
|
2020-12-22 03:14:03 +01:00
|
|
|
getUrl(url) {
|
2020-12-30 15:35:54 +01:00
|
|
|
return BrowserDetect.getURL(url);
|
2020-12-22 23:23:03 +01:00
|
|
|
},
|
2020-12-15 00:26:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
<style lang="scss" scoped>
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
@import 'res/css/uwui-base.scss';
|
|
|
|
@import 'res/css/colors.scss';
|
|
|
|
@import 'res/css/font/overpass.css';
|
|
|
|
@import 'res/css/font/overpass-mono.css';
|
|
|
|
@import 'res/css/common.scss';
|
|
|
|
|
|
|
|
// .relative-wrapper {
|
|
|
|
// position: relative;
|
|
|
|
// width: 100%;
|
|
|
|
// height: 100%;
|
|
|
|
// }
|
|
|
|
|
|
|
|
.site-support-info {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
// padding-left: 2rem;
|
|
|
|
|
|
|
|
.site-support-site {
|
|
|
|
font-size: 1.2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.site-support {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
margin-left: 2rem;
|
|
|
|
border-radius: 8px;
|
|
|
|
padding: 0rem 1.5rem 0rem 1rem;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
position: relative;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.tooltip {
|
|
|
|
padding: 1rem;
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
transform: translateY(110%);
|
|
|
|
width: 42em;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
background-color: rgba(0,0,0,0.90);
|
|
|
|
color: #ccc;
|
|
|
|
}
|
|
|
|
&:hover {
|
2021-11-21 02:08:53 +01:00
|
|
|
.tooltip {
|
2022-01-29 16:23:40 +01:00
|
|
|
display: block;
|
2021-11-21 02:08:53 +01:00
|
|
|
}
|
2022-01-29 16:23:40 +01:00
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.mdi {
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
&.official {
|
|
|
|
background-color: #fa6;
|
|
|
|
color: #000;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.mdi {
|
|
|
|
fill: #000 !important;
|
2021-11-21 02:08:53 +01:00
|
|
|
}
|
2022-01-29 16:23:40 +01:00
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
&.community {
|
|
|
|
background-color: rgb(47, 47, 97);
|
|
|
|
color: #fff;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.mdi {
|
|
|
|
fill: #fff !important;
|
2021-11-21 02:08:53 +01:00
|
|
|
}
|
2022-01-29 16:23:40 +01:00
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
&.no-support {
|
|
|
|
background-color: rgb(138, 65, 126);
|
|
|
|
color: #eee;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.mdi {
|
|
|
|
fill: #eee !important;
|
2021-11-21 02:08:53 +01:00
|
|
|
}
|
2022-01-29 16:23:40 +01:00
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
&.user-added {
|
|
|
|
border: 1px solid #ff0;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
color: #ff0;
|
2021-11-21 02:08:53 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.mdi {
|
|
|
|
fill: #ff0 !important;
|
2021-11-21 02:08:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-29 16:23:40 +01:00
|
|
|
}
|
2021-11-21 02:08:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.uw-hover {
|
|
|
|
position: absolute;
|
|
|
|
top: 10%;
|
|
|
|
left: 10%;
|
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
|
|
|
color: #fff;
|
|
|
|
background-color: #000;
|
2020-12-16 01:40:09 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
z-index: 999999999999999999;
|
|
|
|
}
|
|
|
|
.uw-hover:hover {
|
|
|
|
background-color: #f00;
|
|
|
|
}
|
2020-12-17 01:49:28 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.popup-panel {
|
|
|
|
position: absolute;
|
2021-10-19 22:49:56 +02:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
top: 10%;
|
|
|
|
left: 10%;
|
2020-12-17 01:49:28 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
z-index: 999999999999999999;
|
2020-12-16 01:40:09 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
width: 2500px;
|
|
|
|
height: 1200px;
|
|
|
|
max-width: 80%;
|
|
|
|
max-height: 80%;
|
2020-12-16 01:40:09 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
pointer-events: all !important;
|
2020-12-16 01:40:09 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
background-color: rgba(0,0,0,0.50);
|
|
|
|
color: #fff;
|
2021-01-21 00:21:15 +01:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
overflow-y: auto;
|
2021-10-22 00:30:56 +02:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
backdrop-filter: blur(16px) saturate(120%);
|
2021-10-22 00:30:56 +02:00
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.popup-title, .popup-title h1 {
|
|
|
|
font-size: 48px !important;
|
2020-12-16 01:40:09 +01:00
|
|
|
}
|
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
.tab {
|
|
|
|
display: block;
|
|
|
|
height: 42px;
|
|
|
|
font-size: 2.5rem;
|
|
|
|
background: rgb(87, 54, 26);
|
|
|
|
}
|
|
|
|
.tab:hover {
|
|
|
|
background-color: #f00;
|
2020-12-16 01:40:09 +01:00
|
|
|
}
|
2020-12-15 00:26:19 +01:00
|
|
|
}
|
|
|
|
|
2022-01-29 16:23:40 +01:00
|
|
|
pre {
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
2020-12-15 00:26:19 +01:00
|
|
|
|
2021-10-19 22:49:56 +02:00
|
|
|
</style>
|