-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathconfig.json
More file actions
115 lines (115 loc) · 3.56 KB
/
Copy pathconfig.json
File metadata and controls
115 lines (115 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"plugin_type": "widget",
"name": "Banner Bar",
"edit_page_url": "https://www.optimizely.com/products/experimentation/",
"form_schema": [
{
"default_value": "#inner-wrapper",
"field_type": "selector",
"name": "selector",
"label": "Selector",
"options": {
"choices": [
{
"value": "position: fixed;bottom: 0;left: 0;",
"label": "Bottom"
},
{
"value": "",
"label": "Top"
}
]
}
},
{
"default_value": "beforebegin",
"field_type": "dropdown",
"name": "insert",
"label": "Insert",
"options": {
"choices": [
{
"value": "beforebegin",
"label": "Before"
},
{
"value": "afterend",
"label": "After"
},
{
"value": "afterbegin",
"label": "Prepend"
},
{
"value": "beforeend",
"label": "Append"
}
]
}
},
{
"default_value": "#77c96f",
"field_type": "color",
"name": "bg_color",
"label": "Background Color",
"options": {
"mode": "hex"
}
},
{
"default_value": "rgba(0, 129, 186, 1)",
"field_type": "color",
"name": "bg_color2",
"label": "Background Color 2",
"options": {
"mode": "rgba"
}
},
{
"default_value": "#ffffff",
"field_type": "color",
"name": "color",
"label": "Text Color",
"options": {
"mode": "hex"
}
},
{
"default_value": "https://www.optimizely.com/plans/",
"field_type": "text",
"name": "link",
"label": "Destination Link",
"options": null
},
{
"default_value": "View Plans",
"field_type": "text",
"name": "link_text",
"label": "Link Text",
"options": null
},
{
"default_value": "#ffffff",
"field_type": "color",
"name": "link_color",
"label": "Link Color",
"options": {
"mode": "hex"
}
},
{
"default_value": "Welcome | ",
"field_type": "text",
"name": "text",
"label": "Main Text",
"options": null
}
],
"description": "Displays a banner bar at the top of the page.",
"options": {
"html": "<div id=\"optimizely-extension-{{ extension.$instance }}\" class=\"optly_butter_bar\" style=\"background:-webkit-linear-gradient(left, {{ extension.bg_color }}, {{ extension.bg_color2 }}); color:{{extension.color}};{{extension.location}}\">\n {{ extension.text }}<a href=\"{{ extension.link }}\" style=\"color:{{extension.link_color}};\">{{ extension.link_text }}</a>\n</div>",
"css": ".optly_butter_bar {\n vertical-align: middle !important;\n line-height: 1.4 !important;\n text-decoration: none !important;\n text-align: center !important;\n display: block !important;\n font-size: 20px !important;\n font-weight: 600 !important;\n padding: 10px 0px !important;\n z-index: 999999999999 !important; \n width: 100% !important;\n}\n\n.optly_butter_bar a {\n font-size: 20px !important;\n font-weight: 600 !important;\n}",
"apply_js": "var utils = optimizely.get('utils');\nvar selector = extension.selector;\n\nutils.waitForElement(selector).then(function(element){\n\tvar html = extension.$html;\n var insert = extension.insert;\n element.insertAdjacentHTML(insert, html);\n});",
"undo_js": "var extensionHtml = document.querySelector('.optly_butter_bar');\nif (extensionHtml) extensionHtml.remove();\n"
}
}