1a107601fa490ca69215facceebe3d0dc5e7f1f86bcef0037bdb2d139a15065c3f31e872bae79df3
1
## "The contents of this file are subject to the Common Public Attribution
1
## The contents of this file are subject to the Common Public Attribution
2
## License Version 1.0. (the "License"); you may not use this file except in
2
## License Version 1.0. (the "License"); you may not use this file except in
3
## compliance with the License. You may obtain a copy of the License at
3
## compliance with the License. You may obtain a copy of the License at
4
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
4
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
...
 
...
 
21
################################################################################
21
################################################################################
22
 
22
 
23
<script type="text/javascript">
23
<script type="text/javascript">
24
 
24
<%
 
 
25
   domain = c.site.domain if c.cname else c.domain
 
 
26
 %>
25
function escapeHTML(text) {
27
function escapeHTML(text) {
26
  var div = document.createElement('div');
28
  var div = document.createElement('div');
27
  var text = document.createTextNode(text);
29
  var text = document.createTextNode(text);
...
 
...
 
39
    f = document.forms.widget;
41
    f = document.forms.widget;
40
    which = getrval(f.which);
42
    which = getrval(f.which);
41
    if (which == "all") {
43
    if (which == "all") {
42
        url = "http://${c.domain}/" + f.what.value + "/.embed?limit=" +
44
        url = "http://${domain}/" + f.what.value + "/.embed?limit=" +
43
                      f.num.value + "&t=" + f.when.value;
45
                      f.num.value + "&t=" + f.when.value;
44
    } else if (which == "one") {
46
    } else if (which == "one") {
45
        if (!f.who2.value) return;
47
        if (!f.who2.value) return;
46
        url = "http://${c.domain}/user/"+f.who2.value+"/"+
48
        url = "http://${domain}/user/"+f.who2.value+"/"+
47
                      f.where2.value+".embed?limit=" + f.num.value + 
49
                      f.where2.value+".embed?limit=" + f.num.value + 
48
                      "&sort="+f.what2.value;
50
                      "&sort="+f.what2.value;
49
    } else {
51
    } else {
...
 
...
 
67
  <div id="preview">
69
  <div id="preview">
68
    <span>preview</span>
70
    <span>preview</span>
69
    <div id="previewbox">
71
    <div id="previewbox">
70
      <script src="http://${c.domain}/.embed?limit=5" type="text/javascript"></script>
72
      <script src="http://${domain}/.embed?limit=5" type="text/javascript"></script>
71
    </div>
73
    </div>
72
  </div>
74
  </div>
73
 
75
 
...
 
...
 
139
 
141
 
140
  <p>
142
  <p>
141
    <textarea rows="5" cols="50" id="codebox">
143
    <textarea rows="5" cols="50" id="codebox">
142
      &lt;script src="http://${c.domain}/.embed?limit=5" type="text/javascript">&lt;/script>
144
      &lt;script src="http://${domain}/.embed?limit=5" type="text/javascript">&lt;/script>
143
    </textarea>
145
    </textarea>
144
  </p>
146
  </p>
145
</div>
147
</div>