Skip to content

Commit db1aa0c

Browse files
committed
Added a new orange indicator to highlight elements that are 100% in the viewport but not yet considered viewable.
Fixed cross-site scripting issues in safeframe implementations. Resolved an edge case in task scheduling with the new Scheduler.postTask method. Enhanced size and position detection for highly dynamic ad slots and complex page layouts. Updated webpack configuration to optimize production build by minimizing usage and removing debugging console logs.
1 parent 9c3ebac commit db1aa0c

File tree

8 files changed

+914
-449
lines changed

8 files changed

+914
-449
lines changed

assets/gpt_integration_script.css

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
.viewability-insights-overlay {
1818
align-items: center;
19-
box-shadow: inset 0px 0px 0px 10px rgba(255, 0, 0, 0.75);
19+
box-shadow: inset 0 0 0 10px rgba(255, 0, 0, 0.75);
2020
display: flex;
21-
font-family: Roboto, 'Noto Sans';
21+
font-family: Roboto, 'Noto Sans', serif;
2222
font-size: 16px;
2323
height: 100%;
2424
justify-content: center;
@@ -28,7 +28,6 @@
2828
min-height: 20px;
2929
min-width: 20px;
3030
position: absolute;
31-
position: absolute;
3231
right: 0;
3332
top: 0;
3433
width: 100%;
@@ -45,8 +44,22 @@
4544
);
4645
}
4746

47+
.viewability-insights-overlay.predicted-viewable {
48+
box-shadow: inset 0 0 0 10px rgba(255, 165, 0, 0.75);
49+
}
50+
51+
.viewability-insights-overlay:hover.predicted-viewable {
52+
background: repeating-linear-gradient(
53+
45deg,
54+
rgba(255, 165, 0, 0.2),
55+
rgba(255, 165, 0, 0.2) 10px,
56+
rgba(255, 165, 0, 0.3) 10px,
57+
rgba(255, 165, 0, 0.3) 20px
58+
);
59+
}
60+
4861
.viewability-insights-overlay.viewable {
49-
box-shadow: inset 0px 0px 0px 10px rgba(0, 255, 0, 0.75);
62+
box-shadow: inset 0 0 0 10px rgba(0, 255, 0, 0.75);
5063
}
5164

5265
.viewability-insights-overlay:hover.viewable {
@@ -63,6 +76,10 @@
6376
background: rgba(255, 0, 0, 0.75);
6477
}
6578

79+
.viewability-insights-overlay.predicted-viewable > .slot-info {
80+
background: rgba(255, 165, 0, 0.75);
81+
}
82+
6683
.viewability-insights-overlay.viewable > .slot-info {
6784
background: rgba(0, 255, 0, 0.75);
6885
}

build/webpack.prod.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,47 @@
1414
* limitations under the License.
1515
*/
1616

17-
const { merge } = require('webpack-merge');
17+
const {merge} = require('webpack-merge');
1818
const common = require('./webpack.common.js');
19+
const TerserPlugin = require('terser-webpack-plugin');
20+
21+
const optimizationOptions = {
22+
minimize: true,
23+
minimizer: [
24+
new TerserPlugin({
25+
terserOptions: {
26+
compress: {
27+
pure_funcs: [
28+
'console.log',
29+
'console.info',
30+
'console.debug',
31+
'console.warn'
32+
]
33+
},
34+
},
35+
}),
36+
],
37+
}
1938

2039
module.exports = [
2140
merge(common.devtoolsPageConfig, {
2241
mode: 'production',
42+
optimization: optimizationOptions,
2343
}),
2444
merge(common.panelPageConfig, {
2545
mode: 'production',
46+
optimization: optimizationOptions,
2647
}),
2748
merge(common.contentScriptConfig, {
2849
mode: 'production',
50+
optimization: optimizationOptions,
2951
}),
3052
merge(common.adRequestDetailsSidebarConfig, {
3153
mode: 'production',
54+
optimization: optimizationOptions,
3255
}),
3356
merge(common.gptIntegrationScriptConfig, {
3457
mode: 'production',
58+
optimization: optimizationOptions,
3559
}),
3660
];

global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
declare const serviceWorkerOption: Record<string, unknown>;
1919

2020
/** Google Publisher Tag (GPT) */
21-
declare const googletag: any;
21+
declare let googletag: any;
2222

2323
/** Injected ViewabilityInsights script */
2424
declare const ViewabilityInsights: any;

0 commit comments

Comments
 (0)